nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FragmentTimelineFollowingBusinessPosts extends Fragment implements IAddPost , IGetNewTimeLinePost , IPostUpdateListener , IPullToRefresh , ITimeLineReload , IWebservice , NetworkStateChangeListener , TryAgainListener { public static final String TAG = "FragmentTimelineFollowingBusinessPosts" ; public static final int GET_TIMELINE_POSTS_INT_CODE = 11 ; public static final int GET_SINGLE_POST_INT_CODE = 14 ; AdapterPost adapterPost ; ListView listView ; ArrayList < Post > results ; DialogMessage dialogMessage ; Context fragmentContext ; public static IPostUpdateListener iPostUpdateListener ; public static IUpdateUserProfile iUpdateUserProfile ; public static IAddPost iAddPost ; boolean timelineCatchedEnd ; RelativeLayout layoutNotExistsTimeline ; public static ITimeLineReload iTimeLineReload ; RelativeLayout networkFailLayout ; CharsooActivity charsooActivityContext ; private enum Status { FIRST_TIME , LOADING_MORE , REFRESHING , NONE ; } private FragmentTimelineFollowingBusinessPosts . Status status ; BroadcastReceiver timeLineUpdateReceiver ; PullToRefreshList pullToRefreshListView ; @ Nullable @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public static FragmentTimelineFollowingBusinessPosts newInstance ( ) { } public void updatePost ( Post post ) { } @ Override public void onDestroy ( ) { } private void initialize ( ArrayList < Post > results ) { <START_BUG> adapterPost = new AdapterPost ( this , getActivity ( ) , results , FragmentTimelineAllPosts . TAG ) ; <END_BUG> listView . setAdapter ( adapterPost ) ; } public void loadMoreData ( ) { } public void updateShare ( boolean isShared , int postId ) { } @ Override public void notifyAddPost ( Post post ) { } @ Override public void notifyGetNewPost ( Post post ) throws Exception { } @ Override public void onPostDetailsChange ( int dirtyPostId ) throws Exception { } @ Override public void notifyRefresh ( ) { } @ Override public void notifyLoadMore ( ) { } @ Override public void onTimeLineReload ( ) { } @ Override public void getResult ( int request , Object result ) throws Exception { } @ Override public void getError ( int request , Integer errorCode , String callerStringID ) throws Exception { } @ Override public void doOnNetworkConnected ( ) throws Exception { } @ Override public void doTryAgain ( ) { } RelativeLayout initNotExistsLayout ( View parentView ) { } void handleShowNotExistsLayout ( ) { } void setShowingNotExistsLayout ( boolean show ) { } }

Fix:
adapterPost = new AdapterPost ( this , getActivity ( ) , results , FragmentTimelineFollowingBusinessPosts . TAG ) ;
Buggy code:
class UpdateableBlobStream extends InputStream { private boolean materialized ; private InputStream stream ; private long pos ; private final EmbedBlob blob ; private long maxPos ; UpdateableBlobStream ( EmbedBlob blob , InputStream is ) { } UpdateableBlobStream ( EmbedBlob blob , InputStream is , long pos , long len ) throws IOException , SQLException { } private void updateIfRequired ( ) throws IOException { } public int read ( ) throws IOException { } public int read ( byte [ ] b , int off , int len ) throws IOException { int actualLength = 0 ; updateIfRequired ( ) ; if ( ( maxPos ) != ( - 1 ) ) { actualLength = ( ( int ) ( Math . min ( len , ( ( maxPos ) - ( pos ) ) ) ) ) ; } else { actualLength = len ; } <START_BUG> int retValue = super . read ( b , off , actualLength ) ; <END_BUG> if ( retValue > 0 ) pos += retValue ; return retValue ; } public int read ( byte [ ] b ) throws IOException { } public long skip ( long n ) throws IOException { } }

Fix:
int retValue = stream . read ( b , off , actualLength ) ;
Buggy code:
public class Config { private static final String NEW_LINE = System . getProperty ( "line.separator" ) ; private int roundNumber = 0 ; private Properties props ; private HashMap valByRound = new HashMap ( ) ; private HashMap colForValByRound = new HashMap ( ) ; private String algorithmText ; public Config ( Reader algReader ) throws IOException { } public Config ( Properties props ) { } private void printProps ( ) { } public String get ( String name , String dflt ) { } public void set ( String name , String value ) throws Exception { } public int get ( String name , int dflt ) { } public double get ( String name , double dflt ) { } public boolean get ( String name , boolean dflt ) { } public int newRound ( ) { } private int [ ] propToIntArray ( String s ) { } private double [ ] propToDoubleArray ( String s ) { } private boolean [ ] propToBooleanArray ( String s ) { } public String getColsNamesForValsByRound ( ) { } public String getColsValuesForValsByRound ( int roundNum ) { if ( ( colForValByRound . size ( ) ) == 0 ) { return "" ; } StringBuffer sb = new StringBuffer ( ) ; for ( Iterator it = colForValByRound . keySet ( ) . iterator ( ) ; it . hasNext ( ) ; ) { String name = ( ( String ) ( it . next ( ) ) ) ; String colName = ( ( String ) ( colForValByRound . get ( name ) ) ) ; String template = "<seq2seq4repair_space>" + colName ; if ( roundNum < 0 ) { sb . append ( Format . formatPaddLeft ( "-" , template ) ) ; } else { Object a = valByRound . get ( name ) ; if ( a instanceof int [ ] ) { int [ ] ai = ( ( int [ ] ) ( a ) ) ; int n = roundNum % ( ai . length ) ; sb . append ( Format . format ( ai [ n ] , template ) ) ; } else if ( a instanceof double [ ] ) { double [ ] ad = ( ( double [ ] ) ( a ) ) ; int n = roundNum % ( ad . length ) ; <START_BUG> sb . append ( Format . format ( 2 , ( ( float ) ( ad [ n ] ) ) , template ) ) ; <END_BUG> } else { boolean [ ] ab = ( ( boolean [ ] ) ( a ) ) ; int n = roundNum % ( ab . length ) ; sb . append ( Format . formatPaddLeft ( ( "" + ( ab [ n ] ) ) , template ) ) ; } } } return sb . toString ( ) ; } public int getRoundNumber ( ) { } public String getAlgorithmText ( ) { } }

Fix:
sb . append ( Format . format ( 2 , ad [ n ] , template ) ) ;
Buggy code:
public class TaskCollection { protected Storage storage ; protected LinkedList < Task > tasks ; protected BalloonNotification notification ; public TaskCollection ( ) throws Exception { } public TaskCollection ( Storage storage ) throws Exception { } public void loadFromFile ( ) throws Exception { } public void create ( Task task ) throws Exception { } public void update ( Task task ) throws Exception { } public Task get ( int index ) { } public List < Task > past ( ) { } public List < Task > filter ( Predicate < ? super Task > predicate ) { } public List < Task > upcoming ( ) { } public void delete ( Task task ) throws Exception { } public List < Task > search ( String query ) { } public List < Task > notDone ( ) { } public List < Task > done ( ) { } public List < Task > floating ( ) { } private void updateNotification ( ) { <START_BUG> notification . sheduleNotifications ( notDone ( ) ) ; <END_BUG> } }

Fix:
notification . scheduleNotifications ( notDone ( ) ) ;
Buggy code:
public class CovMerge extends Task { private File home = null ; private File tofile = null ; private ArrayList filesets = new ArrayList ( ) ; private boolean verbose ; public CovMerge ( ) { } public void setHome ( File value ) { } public void setTofile ( File value ) { } public void setVerbose ( boolean flag ) { } public void addFileset ( FileSet fs ) { } public void execute ( ) throws TaskException { checkOptions ( ) ; File paramfile = createParamFile ( ) ; try { Commandline cmdl = new Commandline ( ) ; cmdl . setExecutable ( new File ( home , "jpcovmerge" ) . getAbsolutePath ( ) ) ; if ( verbose ) { cmdl . addArgument ( "-v" ) ; } cmdl . addArgument ( ( "-jp_paramfile=" + ( paramfile . getAbsolutePath ( ) ) ) ) ; final Execute2 exe = new Execute2 ( ) ; setupLogger ( exe ) ; getLogger ( ) . debug ( cmdl . toString ( ) ) ; <START_BUG> exe . setCommandline ( cmdl . getCommandline ( ) ) ; <END_BUG> int exitValue = exe . execute ( ) ; if ( exitValue != 0 ) { throw new TaskException ( ( ( "JProbe<seq2seq4repair_space>Coverage<seq2seq4repair_space>Merging<seq2seq4repair_space>failed<seq2seq4repair_space>(" + exitValue ) + ")" ) ) ; } } catch ( IOException e ) { throw new TaskException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>run<seq2seq4repair_space>JProbe<seq2seq4repair_space>Coverage<seq2seq4repair_space>Merge:<seq2seq4repair_space>" + e ) ) ; } finally { paramfile . delete ( ) ; } } protected File [ ] getSnapshots ( ) throws TaskException { } protected void checkOptions ( ) throws TaskException { } protected File createParamFile ( ) throws TaskException { } protected File createTmpFile ( ) { } }

Fix:
exe . setCommandline ( cmdl ) ;
Buggy code:
public final class Paths { private Paths ( ) { } public static int getRankDistance ( final Square start , final Square end ) { } public static int getFileDistance ( final Square start , final Square end ) { } public static boolean isSameDiagonal ( final Square start , final Square end ) { } public static boolean isPathClear ( final Square start , final Square end ) { } private static boolean isSameSquareOrKnightMove ( final Square start , final Square end ) { } private static boolean isPathClearSameRank ( final boolean towardKingside , final int startIndex , final int endIndex , final Square [ ] squares ) { boolean clear = true ; if ( towardKingside ) { for ( int i = startIndex + 1 ; i < endIndex ; i ++ ) clear &= squares [ i ] . isEmpty ( ) ; } else { <START_BUG> for ( int i = endIndex - 1 ; i > startIndex ; i -- ) <END_BUG> clear &= squares [ i ] . isEmpty ( ) ; } return clear ; } private static boolean isPathClearSameFile ( final boolean towardEighthRank , final int startIndex , final int endIndex , final Square [ ] squares ) { } private static boolean isPathClearSameDiagonal ( final int rankDistance , final int fileDistance , final int startIndex , final int endIndex , final Square [ ] squares ) { } private static boolean isValidPair ( final Square a , final Square b ) { } }

Fix:
for ( int i = startIndex - 1 ; i > endIndex ; i -- )
Buggy code:
class PackageFragmentInfo extends OpenableElementInfo { protected Object [ ] fNonJavaResources ; public PackageFragmentInfo ( ) { } boolean containsJavaResources ( ) { } Object [ ] getNonJavaResources ( IResource underlyingResource , PackageFragmentRoot rootHandle ) { Object [ ] nonJavaResources = fNonJavaResources ; if ( nonJavaResources == null ) { try { <START_BUG> nonJavaResources = PackageFragmentRootInfo . computeFolderNonJavaResources ( ( ( JavaProject ) ( rootHandle . getJavaProject ( ) ) ) , ( ( IContainer ) ( underlyingResource ) ) , rootHandle . getExclusionPatterns ( ) ) ; <END_BUG> } catch ( JavaModelException e ) { } fNonJavaResources = nonJavaResources ; } return nonJavaResources ; } synchronized void setNonJavaResources ( Object [ ] resources ) { } }

Fix:
nonJavaResources = PackageFragmentRootInfo . computeFolderNonJavaResources ( ( ( JavaProject ) ( rootHandle . getJavaProject ( ) ) ) , ( ( IContainer ) ( underlyingResource ) ) , rootHandle . fullExclusionPatternChars ( ) ) ;
Buggy code:
public class SetSharedEditorSelectionAction implements IEditorActionDelegate { ITextEditor editor = null ; public void setActiveEditor ( IAction action , IEditorPart targetEditor ) { } protected void setEnabled ( IAction action ) { } protected IFile getFileForPart ( ITextEditor editor ) { } protected IProject getProjectForResource ( IResource res ) { } protected IWorkbench getWorkbench ( ) { } protected ClientEntry isConnected ( IResource res ) { } public void run ( IAction action ) { if ( ( editor ) == null ) return ; ISelection s = editor . getSelectionProvider ( ) . getSelection ( ) ; ITextSelection textSelection = null ; if ( s instanceof ITextSelection ) { textSelection = ( ( ITextSelection ) ( s ) ) ; } if ( textSelection == null ) return ; IFile file = getFileForPart ( editor ) ; if ( file == null ) return ; IProject project = getProjectForResource ( file ) ; ClientEntry entry = isConnected ( project ) ; if ( entry == null ) { <START_BUG> MessageDialog . openInformation ( getWorkbench ( ) . getDisplay ( ) . getActiveShell ( ) , "Project<seq2seq4repair_space>Not<seq2seq4repair_space>Connected<seq2seq4repair_space>to<seq2seq4repair_space>Collaboration<seq2seq4repair_space>Group" , ( ( "Project<seq2seq4repair_space>'" + ( project . getName ( ) ) ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>any<seq2seq4repair_space>collaboration<seq2seq4repair_space>group.<seq2seq4repair_space>To<seq2seq4repair_space>connect,<seq2seq4repair_space>open<seq2seq4repair_space>context<seq2seq4repair_space>menu<seq2seq4repair_space>for<seq2seq4repair_space>project<seq2seq4repair_space>and<seq2seq4repair_space>choose<seq2seq4repair_space>ECF->Join<seq2seq4repair_space>ECF<seq2seq4repair_space>Collaboration..." ) ) ; <END_BUG> return ; } EclipseCollabSharedObject collabsharedobject = entry . getObject ( ) ; if ( collabsharedobject != null ) { collabsharedobject . sendOpenAndSelectForFile ( null , file . getProjectRelativePath ( ) . toString ( ) , textSelection . getOffset ( ) , textSelection . getLength ( ) ) ; } } public void selectionChanged ( IAction action , ISelection selection ) { } }

Fix:
MessageDialog . openInformation ( getWorkbench ( ) . getDisplay ( ) . getActiveShell ( ) , "Project<seq2seq4repair_space>Not<seq2seq4repair_space>Connected<seq2seq4repair_space>to<seq2seq4repair_space>Collaboration<seq2seq4repair_space>Group" , ( ( "Project<seq2seq4repair_space>'" + ( project . getName ( ) ) ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>any<seq2seq4repair_space>collaboration<seq2seq4repair_space>group.<seq2seq4repair_space>To<seq2seq4repair_space>connect,<seq2seq4repair_space>open<seq2seq4repair_space>context<seq2seq4repair_space>menu<seq2seq4repair_space>for<seq2seq4repair_space>resource<seq2seq4repair_space>and<seq2seq4repair_space>choose<seq2seq4repair_space>ECF->Join<seq2seq4repair_space>ECF<seq2seq4repair_space>Collaboration..." ) ) ;
Buggy code:
public class StyleXMLPage extends StyleEditorPage { SashForm sash ; Text sldTextBox ; Text errTextBox ; boolean dirty = false ; @ Override public void createPageContent ( Composite parent ) { } @ Override public boolean performCancel ( ) { } @ Override public String getErrorMessage ( ) { } private void resetCursor ( Cursor c ) { } private void setDisplayCursor ( Cursor c ) { } @ Override public boolean isValid ( ) { } public boolean okToLeave ( ) { <START_BUG> boolean readyToLeave = false ; <END_BUG> if ( dirty ) { readyToLeave = updateSLD ( ) ; } if ( readyToLeave ) { return true ; } else { return MessageDialog . openQuestion ( Display . getCurrent ( ) . getActiveShell ( ) , StyleEditor_xml_lose_changes_1 , StyleEditor_xml_lose_changes_2 ) ; } } public boolean performOk ( ) { } private String styleToXML ( ) { } private StyledLayerDescriptor XMLtoSLD ( String xml ) { } private StyledLayerDescriptor XMLtoSLD ( String xml , String encoding ) { } private InputStream getXMLasInputStream ( String xml , String encoding ) { } public void gotFocus ( ) { } @ Override public void styleChanged ( Object source ) { } public void refresh ( ) { } private boolean updateSLD ( ) { } @ Override public void dispose ( ) { } @ Override public String getLabel ( ) { } public boolean performApply ( ) { } }

Fix:
boolean readyToLeave = true ;
Buggy code:
public class MutableLong { private long value ; public MutableLong ( ) { } public MutableLong ( long value ) { } public long get ( ) { } public void set ( long value ) { } public void setIfMax ( long value ) { } public void setIfMin ( long value ) { <START_BUG> if ( ( this . value ) < value ) { <END_BUG> this . value = value ; } } }

Fix:
if ( ( this . value ) > value ) {
Buggy code:
public abstract class BasePlayer extends StaticStuff { protected Navigation nav = null ; public BasePlayer ( RobotController rc ) { } public void runAtEndOfTurn ( ) { } public void walkAimlessly ( ) { } public void getOffPowerNode ( ) { } public void randomWalk ( ) { } public void broadcastMessage ( ) { } public Robot findAFriendly ( ) { } public Robot findAWeakFriendly ( ) { } public Robot findALowEnergonFriendly ( ) { } public boolean acceptableFluxTransferLocation ( MapLocation attempt ) { <START_BUG> return ( this . myRC . getLocation ( ) . distanceSquaredTo ( attempt ) ) <= 1 ; <END_BUG> } public boolean compareRobotFlux ( Robot one , Robot two ) { } public boolean compareRobotEnergon ( Robot one , Robot two ) { } public boolean compareRobotDistance ( Robot one , Robot two ) { } public boolean enemyTowerPresent ( MapLocation target ) { } public void destroyTower ( MapLocation target ) { } public Robot senseClosestEnemy ( ) { } public void attackClosestEnemy ( Robot closestTar ) { } public void attackAndChaseClosestEnemy ( Robot closestTar ) { } public boolean ownAdjacentTower ( MapLocation m ) { } @ Deprecated public void goCloser ( MapLocation target ) { } public boolean compareMapLocationDistance ( MapLocation one , MapLocation two ) { } public void aboutToDie ( ) { } public MapLocation reacquireNearestFriendlyArchonLocation ( ) { } }

Fix:
return ( this . myRC . getLocation ( ) . distanceSquaredTo ( attempt ) ) <= 2 ;
Buggy code:
public abstract class RDTestCase extends APITestCase { protected DataEngine myGenDataEngine ; protected DataEngine myPreDataEngine ; protected DataEngine myPreDataEngine2 ; protected IDocArchiveWriter archiveWriter ; protected IDocArchiveReader archiveReader ; protected ScriptableObject scope ; protected String fileName ; protected String fileName2 ; private static int index = 0 ; public void setUp ( ) throws Exception { } public void tearDown ( ) throws Exception { } protected boolean useFolderArchive ( ) { } private String getOutputPath ( ) { } protected DataEngineContext newContext ( int type , String fileName ) throws BirtException { } protected DataEngineContext newContext ( int type , String fileName , String fileName2 ) throws BirtException { boolean useFolder = useFolderArchive ( ) ; switch ( type ) { case DataEngineContext . MODE_GENERATION : { try { if ( useFolder == true ) archiveWriter = new FolderArchiveWriter ( fileName ) ; else archiveWriter = new FileArchiveWriter ( fileName ) ; archiveWriter . initialize ( ) ; } catch ( IOException e ) { throw new IllegalArgumentException ( e . getMessage ( ) ) ; } DataEngineContext context = DataEngineContext . newInstance ( MODE_GENERATION , null , null , archiveWriter ) ; context . setTmpdir ( this . getTempDir ( ) ) ; return context ; } case DataEngineContext . MODE_PRESENTATION : { try { if ( useFolder == true ) <START_BUG> archiveReader = new FolderArchiveReader ( fileName ) ; <END_BUG> else archiveReader = new FileArchiveReader ( fileName ) ; archiveReader . open ( ) ; } catch ( IOException e ) { throw new IllegalArgumentException ( e . getMessage ( ) ) ; } DataEngineContext context = DataEngineContext . newInstance ( MODE_PRESENTATION , null , archiveReader , null ) ; context . setTmpdir ( this . getTempDir ( ) ) ; return context ; } case DataEngineContext . MODE_UPDATE : { try { if ( useFolder == true ) archiveReader = new FolderArchiveReader ( fileName ) ; else archiveReader = new FileArchiveReader ( fileName ) ; archiveReader . open ( ) ; if ( useFolder == true ) archiveWriter = new FolderArchiveWriter ( fileName2 ) ; else archiveWriter = new FileArchiveWriter ( fileName2 ) ; archiveWriter . initialize ( ) ; } catch ( IOException e ) { throw new IllegalArgumentException ( e . getMessage ( ) ) ; } DataEngineContext context = DataEngineContext . newInstance ( MODE_UPDATE , null , archiveReader , archiveWriter ) ; context . setTmpdir ( this . getTempDir ( ) ) ; return context ; } default : throw new IllegalArgumentException ( ( "" + type ) ) ; } } protected void closeArchiveWriter ( ) throws DataException { } protected void closeArchiveReader ( ) throws DataException { } }

Fix:
archiveReader = new FolderArchiveReader ( fileName , true ) ;
Buggy code:
public class MainActivity extends ActionBarActivity { static TextView textbox ; static EditText ipbox ; static EditText portbox ; static EditText sessionidbox ; static Button startbutton ; public static HashMap < Integer , WebView > webViewMap = new HashMap < Integer , WebView > ( ) ; public static String logfilename ; public static Context context ; static String defaultServerIP = "10.129.5.155" ; static String defaultServerPort = "8080" ; static String serverip = "10.129.5.155" ; static int serverport = 8080 ; static int sessionid = 2312 ; static String myip ; static long serverTimeDelta = 0 ; static boolean experimentOn = true ; static boolean running = false ; static int numDownloadOver = 0 ; static ServerSocket listen = null ; static Load load = null ; static int currEvent = 0 ; static AlarmManager am ; static WifiManager wifimanager ; static SimpleDateFormat sdf = new SimpleDateFormat ( "ZZZZ<seq2seq4repair_space>HH:mm:s:S" , Locale . US ) ; static File logDir ; SharedPreferences sharedPreferences ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public static void reset ( Context ctx ) { } @ Override public void onBackPressed ( ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } boolean isEmpty ( EditText et ) { } public void startService ( View v ) { } public void useDefaultServer ( View v ) { } public void exit ( View v ) { } private class ExitTask extends AsyncTask < URL , Integer , Integer > { protected Integer doInBackground ( URL ... urls ) { } protected void onProgressUpdate ( Integer ... progress ) { } protected void onPostExecute ( Integer result ) { } } private boolean isNetworkAvailable ( ) { } private void showNetworkErrorDialog ( ) { } static void setKillTimeoutAlarm ( Context context ) { Log . d ( "DEBUG_MAIN_ACTIVITY" , ( "restart<seq2seq4repair_space>timeout<seq2seq4repair_space>alarm<seq2seq4repair_space>" + ( Constants . killTimeoutDuration ) ) ) ; Intent timeoutintent = new Intent ( context , AlarmReceiver . class ) ; timeoutintent . putExtra ( "killtimeout" , 200 ) ; PendingIntent timeoutsender = PendingIntent . getBroadcast ( context , timeoutAlarmRequestCode , timeoutintent , FLAG_CANCEL_CURRENT ) ; Calendar cal = Calendar . getInstance ( ) ; cal . add ( Calendar . MINUTE , killTimeoutDuration ) ; <START_BUG> Log . d ( LOGTAG , ( ( "Scheduling<seq2seq4repair_space>KILLTIMEOUT<seq2seq4repair_space>@" + ( MainActivity . sdf . format ( cal . getTime ( ) ) ) ) + "\n" ) ) ; <END_BUG> MainActivity . am . set ( RTC_WAKEUP , cal . getTimeInMillis ( ) , timeoutsender ) ; } static void cancelTimeoutAlarm ( Context ctx ) { } public static synchronized void removeWebView ( int eventid ) { } void hideKeyBoard ( ) { } }

Fix:
Log . d ( "DEBUG_MAIN_ACTIVITY" , ( ( "Scheduling<seq2seq4repair_space>KILLTIMEOUT<seq2seq4repair_space>@" + ( MainActivity . sdf . format ( cal . getTime ( ) ) ) ) + "\n" ) ) ;
Buggy code:
public class DisguiseTask implements Runnable { public MobDisguise plugin ; public DisguiseTask ( final MobDisguise instance ) { } public void run ( ) { for ( final String playerName : players . keySet ( ) ) { final Player p = Bukkit . getServer ( ) . getPlayer ( playerName ) ; if ( p == null ) { continue ; } <START_BUG> MobDisguiseAPI . getPlayerDisguise ( p ) . refresh ( ) ; <END_BUG> } } }

Fix:
MobDisguiseAPI . getPlayerDisguise ( p ) . sendUpdate ( ) ;
Buggy code:
public class PackageName implements IClusterable { private static final long serialVersionUID = 1L ; private final String name ; public static PackageName forClass ( final Class < ? > c ) { } public static PackageName forPackage ( final Package p ) { } private PackageName ( final String name ) { } @ Override <START_BUG> public boolean equals ( Object that ) { <END_BUG> if ( that instanceof PackageName ) { return ( ( PackageName ) ( that ) ) . name . equals ( name ) ; } return false ; } public String getName ( ) { } @ Override public String toString ( ) { } }

Fix:
public boolean equals ( final Object that ) {
Buggy code:
public class ConnectivityStateCheck { private InetAddress remoteAddress ; private TimerTask wifiRemoteCheckTask = new TimerTask ( ) { public void run ( ) { } } ; private TimerTask bluetoothRemoteCheckTask = new TimerTask ( ) { public void run ( ) { } } ; private Timer timerRemoteCheck ; private SharedPrefs mSharedPrefs ; private Context mContext ; public ConnectivityStateCheck ( Context mContext ) { } public int getConnectivityType ( ) { } public String getConnectivityState ( ) { } public String getBluetoothState ( ) { } public String getWiFiState ( ) { } public String getWiFiDirectState ( ) { } public void showErrorDialog ( ) { } public boolean startConnectivityStateThread ( ) { try { if ( ( timerRemoteCheck ) == null ) { timerRemoteCheck = new Timer ( ) ; if ( ( mSharedPrefs . getConnectivityTypeTemp ( ) ) == 1 ) { } else if ( ( mSharedPrefs . getConnectivityTypeTemp ( ) ) == 2 ) { try { remoteAddress = InetAddress . getByName ( mSharedPrefs . getRemoteAddress ( ) ) ; } catch ( UnknownHostException e1 ) { } <START_BUG> timerRemoteCheck . scheduleAtFixedRate ( wifiRemoteCheckTask , 5000 , 5000 ) ; <END_BUG> } } return true ; } catch ( Exception e ) { return false ; } } public boolean stopConnectivityStateThread ( ) { } }

Fix:
timerRemoteCheck . scheduleAtFixedRate ( wifiRemoteCheckTask , 0 , 5000 ) ;
Buggy code:
public class MainActivity extends ActionBarActivity implements LocationListener { public static String PICTURE_CAP_URL = "http:////85babfa.ngrok.com//pictureCapture" ; public static String PICTURE_GET_URL = "http:////85babfa.ngrok.com//updateNearest" ; public static int MAX_TRIES = 500 ; public static String username = "Anonymous" ; LocationManager locationMan ; ListView lv ; public static boolean done = false ; public static int points = 0 ; public static int temp = 0 ; public static double latitude = 0 ; public static double longitude = 0 ; public ArrayList < Selfie > selfieList = new ArrayList < Selfie > ( ) ; public void goToMap ( View view ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } public ArrayList < Selfie > getSelfies ( ) { } public void updatePoints ( ) { } public void httpPostToServer ( Bitmap pic ) { HttpClient httpClient = new DefaultHttpClient ( ) ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; pic . compress ( JPEG , 100 , baos ) ; byte [ ] imageBytes = baos . toByteArray ( ) ; String encodedImage = Base64 . encodeToString ( imageBytes , URL_SAFE ) ; try { HttpPost request = new HttpPost ( MainActivity . PICTURE_CAP_URL ) ; StringEntity params = new StringEntity ( ( ( ( ( ( ( ( ( ( "body={\"latitude\":\"" + ( Double . toString ( MainActivity . latitude ) ) ) + "\",\"longitude\":\"" ) + ( Double . toString ( MainActivity . longitude ) ) ) + "\"," ) + "\"username\":\"" ) + ( MainActivity . username ) ) + "\",\"picture\":\"" ) + encodedImage ) + "\"}" ) ) ; request . addHeader ( "content-type" , "application//x-www-form-urlencoded" ) ; request . setEntity ( params ) ; HttpResponse response = httpClient . execute ( request ) ; updatePoints ( ) ; } catch ( Exception ex ) { Log . d ( "net<seq2seq4repair_space>" , "didn't<seq2seq4repair_space>work" ) ; } finally { httpClient . getConnectionManager ( ) . shutdown ( ) ; } <START_BUG> MainActivity . points += MainActivity . temp ; <END_BUG> MainActivity . done = true ; } @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void takePic ( View view ) { } public void logIn ( View view ) { } @ Override public void onLocationChanged ( Location location ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } public void updateListView ( ) { } @ Override public void onStatusChanged ( String provider , int status , Bundle extras ) { } @ Override public void onProviderEnabled ( String provider ) { } @ Override public void onProviderDisabled ( String provider ) { } No newline ; at end ; of file ; }

Fix:
MainActivity . points += ( MainActivity . temp ) + 1 ;
Buggy code:
public abstract class WorkbenchWizardNode implements IWizardNode , IPluginContribution { protected WorkbenchWizardSelectionPage parentWizardPage ; protected IWizard wizard ; protected WorkbenchWizardElement wizardElement ; public WorkbenchWizardNode ( WorkbenchWizardSelectionPage aWizardPage , WorkbenchWizardElement element ) { } public abstract IWorkbenchWizard createWizard ( ) throws CoreException { } public void dispose ( ) { } protected IStructuredSelection getCurrentResourceSelection ( ) { } public Point getExtent ( ) { } public String getLocalId ( ) { } public String getPluginId ( ) { } public IWizard getWizard ( ) { if ( ( wizard ) != null ) return wizard ; final IWorkbenchWizard [ ] workbenchWizard = new IWorkbenchWizard [ 1 ] ; final IStatus [ ] statuses = new IStatus [ 1 ] ; BusyIndicator . showWhile ( parentWizardPage . getShell ( ) . getDisplay ( ) , new Runnable ( ) { public void run ( ) { Platform . run ( new SafeRunnable ( ) { public void handleException ( Throwable e ) { <START_BUG> statuses [ 0 ] = new Status ( IStatus . ERROR , wizardElement . getConfigurationElement ( ) . getDeclaringExtension ( ) . getUniqueIdentifier ( ) , IStatus . OK , e . getMessage ( ) , e ) ; <END_BUG> } public void run ( ) { try { workbenchWizard [ 0 ] = createWizard ( ) ; } catch ( CoreException e ) { statuses [ 0 ] = e . getStatus ( ) ; } } } ) ; } } ) ; if ( ( statuses [ 0 ] ) != null ) { parentWizardPage . setErrorMessage ( WorkbenchMessages . getString ( "WorkbenchWizard.errorMessage" ) ) ; ErrorDialog . openError ( parentWizardPage . getShell ( ) , WorkbenchMessages . getString ( "WorkbenchWizard.errorTitle" ) , WorkbenchMessages . getString ( "WorkbenchWizard.errorMessage" ) , statuses [ 0 ] ) ; return null ; } IStructuredSelection currentSelection = getCurrentResourceSelection ( ) ; currentSelection = wizardElement . adaptedSelection ( currentSelection ) ; workbenchWizard [ 0 ] . init ( getWorkbench ( ) , currentSelection ) ; wizard = workbenchWizard [ 0 ] ; return wizard ; } public WorkbenchWizardElement getWizardElement ( ) { } protected IWorkbench getWorkbench ( ) { } public boolean isContentCreated ( ) { } }

Fix:
statuses [ 0 ] = new Status ( IStatus . ERROR , wizardElement . getConfigurationElement ( ) . getDeclaringExtension ( ) . getUniqueIdentifier ( ) , IStatus . OK , ( ( e . getMessage ( ) ) == null ? "" : e . getMessage ( ) ) , e ) ;
Buggy code:
class MemContentsSub { private MemContentsSub ( ) { } static MemContentsSub . ContentsInterface createContents ( int size , int bits ) { } static abstract class ContentsInterface implements Cloneable { @ Override public MemContentsSub . ContentsInterface clone ( ) { } abstract int getLength ( ) { } abstract int get ( int addr ) { } abstract void set ( int addr , int value ) { } abstract void clear ( ) { } abstract void load ( int start , int [ ] values , int mask ) ; boolean matches ( int [ ] values , int start , int mask ) { } int [ ] get ( int start , int len ) { } boolean isClear ( ) { } } private static class ByteContents extends MemContentsSub . ContentsInterface { private byte [ ] data ; public ByteContents ( int size ) { } @ Override public MemContentsSub . ByteContents clone ( ) { } @ Override int getLength ( ) { } @ Override int get ( int addr ) { } @ Override void set ( int addr , int value ) { } @ Override void clear ( ) { } @ Override void load ( int start , int [ ] values , int mask ) { int n = Math . min ( values . length , ( ( data . length ) - start ) ) ; for ( int i = 0 ; i < n ; i ++ ) { data [ ( start + i ) ] = ( ( byte ) ( ( values [ i ] ) & mask ) ) ; } } } private static class ShortContents extends MemContentsSub . ContentsInterface { private short [ ] data ; public ShortContents ( int size ) { } @ Override public MemContentsSub . ShortContents clone ( ) { } @ Override int getLength ( ) { } @ Override int get ( int addr ) { } @ Override void set ( int addr , int value ) { } @ Override void clear ( ) { } @ Override void load ( int start , int [ ] values , int mask ) { int n = Math . min ( values . length , ( ( data . length ) - start ) ) ; for ( int i = 0 ; i < n ; i ++ ) { data [ ( start + i ) ] = ( ( short ) ( ( values [ i ] ) & mask ) ) ; } } } private static class IntContents extends MemContentsSub . ContentsInterface { private int [ ] data ; public IntContents ( int size ) { } @ Override public MemContentsSub . IntContents clone ( ) { } @ Override int getLength ( ) { } @ Override int get ( int addr ) { } @ Override void set ( int addr , int value ) { } @ Override void clear ( ) { } @ Override void load ( int start , int [ ] values , int mask ) { int n = Math . min ( values . length , ( ( data . length ) - start ) ) ; <START_BUG> for ( int i = 0 ; i < n ; i ++ ) { <END_BUG> data [ i ] = ( values [ i ] ) & mask ; } } } }

Fix:
for ( int i = start ; i < n ; i ++ ) {
Buggy code:
public class StringID extends BaseID { private static final long serialVersionUID = 3256437019155446068L ; public static class StringIDNamespace extends Namespace { private static final long serialVersionUID = 7924280015192029963L ; public StringIDNamespace ( String name , String desc ) { } public StringIDNamespace ( ) { } public ID createInstance ( Object [ ] parameters ) throws IDCreateException { if ( ( parameters == null ) || ( ( parameters . length ) == 0 ) ) { throw new IDCreateException ( Messages . StringID_StringID_Name_Not_Null ) ; <START_BUG> } else <END_BUG> return new StringID ( this , ( ( String ) ( parameters [ 0 ] ) ) ) ; } public String getScheme ( ) { } public Class [ ] [ ] getSupportedParameterTypes ( ) { } } protected String value ; protected StringID ( Namespace n , String s ) { } public int compareTo ( Object o ) { } public boolean equals ( Object o ) { } public String getName ( ) { } public int hashCode ( ) { } public Namespace getNamespace ( ) { } public String toExternalForm ( ) { } public String toString ( ) { } protected int namespaceCompareTo ( BaseID obj ) { } protected boolean namespaceEquals ( BaseID obj ) { } protected String namespaceGetName ( ) { } protected int namespaceHashCode ( ) { } protected synchronized void setEmptyNamespace ( ) { } }

Fix:
}
Buggy code:
public class Database_Sqliteopenhelper extends SQLiteOpenHelper { public static final String key_id = "_id" ; public static final String key_name = "name" ; public static final String key_address = "address" ; public static final String key_phone = "phone_num" ; public Database_Sqliteopenhelper ( Context context ) { } public void onCreate ( SQLiteDatabase db ) { } private void insertContacts ( SQLiteDatabase db ) { } public Cursor fetchAllBars ( SQLiteDatabase db ) { <START_BUG> Cursor c = db . query ( TABLE_NAME , new String [ ] { Database_Sqliteopenhelper . key_name , Database_Sqliteopenhelper . key_address , Database_Sqliteopenhelper . key_phone } , null , null , null , null , null ) ; <END_BUG> if ( c != null ) c . moveToFirst ( ) ; return c ; } public void onUpgrade ( SQLiteDatabase db , int oldV , int newV ) { } }

Fix:
Cursor c = db . query ( TABLE_NAME , new String [ ] { Database_Sqliteopenhelper . key_id , Database_Sqliteopenhelper . key_name , Database_Sqliteopenhelper . key_address , Database_Sqliteopenhelper . key_phone } , null , null , null , null , null ) ;
Buggy code:
public interface CompletionListener < S extends Enum , P extends Payload > { <START_BUG> void notifyComplete ( P payload , S lastState , Exception error ) ; <END_BUG> }

Fix:
void notifyComplete ( P payload , S lastState , Throwable error ) ;
Buggy code:
public class PlanningExportBuilder { private PlanningSplitter splitter = new PlanningSplitterImpl ( ) ; private AlgoPlanningImplV2 algoPlanning = new AlgoPlanningImplV2 ( ) ; private AlgoJuryAssignation algoJuryAssignation = new AlgoJuryAssignationImpl ( ) ; private PlanningExport planningExport = new PlanningExcelExport ( ) ; private PlanningDataValidator validator = new PlanningDataValidatorImpl ( ) ; private Planning planning ; private Collection < Unavailability > unavailabilities ; private Collection < Participant > participants ; private Collection < TimeBox > timeboxes ; private Collection < OralDefense > oralDefenses ; public PlanningExportBuilder ( Planning p ) { } public PlanningExportBuilder setUnavailabilities ( Collection < Unavailability > unavailabilities ) { } public PlanningExportBuilder setParticipants ( Collection < Participant > participants ) { } public PlanningExportBuilder split ( ) { } public PlanningExportBuilder validate ( ) { this . validator . configure ( planning , participants , timeboxes ) ; <START_BUG> this . validate ( ) ; <END_BUG> return this ; } public PlanningExportBuilder build ( ) { } public File toExcel ( ) throws Exception { } public Collection < TimeBox > getTimeboxes ( ) { } public Collection < OralDefense > getOralDefenses ( ) { } }

Fix:
this . validator . validate ( ) ;
Buggy code:
public abstract class AbstractUnicodeExtraField implements ZipExtraField { private long nameCRC32 ; private byte [ ] unicodeName ; private byte [ ] data ; protected AbstractUnicodeExtraField ( ) { } protected AbstractUnicodeExtraField ( String text , byte [ ] bytes , int off , int len ) { } protected AbstractUnicodeExtraField ( String text , byte [ ] bytes ) { } private void assembleData ( ) { } public long getNameCRC32 ( ) { } public void setNameCRC32 ( long nameCRC32 ) { } public byte [ ] getUnicodeName ( ) { } public void setUnicodeName ( byte [ ] unicodeName ) { } public byte [ ] getCentralDirectoryData ( ) { } public ZipShort getCentralDirectoryLength ( ) { if ( ( data ) == null ) { assembleData ( ) ; } <START_BUG> return new ZipShort ( data . length ) ; <END_BUG> } public byte [ ] getLocalFileDataData ( ) { } public ZipShort getLocalFileDataLength ( ) { } public void parseFromLocalFileData ( byte [ ] buffer , int offset , int length ) throws ZipException { } public void parseFromCentralDirectoryData ( byte [ ] buffer , int offset , int length ) throws ZipException { } }

Fix:
return new ZipShort ( ( ( data ) != null ? data . length : 0 ) ) ;
Buggy code:
public class RedeployPublisherTest extends HudsonTestCase { @ Bug ( 2593 ) public void testBug2593 ( ) throws Exception { } public void testConfigRoundtrip ( ) throws Exception { } @ Email ( "http:////www.nabble.com//tar.gz-becomes-.gz-after-Hudson-deployment-td25391364.html" ) @ Bug ( 3814 ) public void testTarGz ( ) throws Exception { } public void testTarGzUniqueVersionTrue ( ) throws Exception { } public void ignore_testTarGzMaven3 ( ) throws Exception { } public void ignore_testTarGzUniqueVersionTrueMaven3 ( ) throws Exception { } @ Bug ( 3773 ) public void testDeployUnstable ( ) throws Exception { configureDefaultMaven ( ) ; MavenModuleSet m2 = createMavenProject ( ) ; File repo = createTmpDir ( ) ; FileUtils . cleanDirectory ( repo ) ; <START_BUG> m2 . setScm ( new ExtractResourceSCM ( getClass ( ) . getResource ( "maven-test-failure-findbugs.zip" ) ) ) ; <END_BUG> m2 . getPublishersList ( ) . add ( new RedeployPublisher ( "" , repo . toURI ( ) . toString ( ) , false , true ) ) ; MavenModuleSetBuild b = m2 . scheduleBuild2 ( 0 ) . get ( ) ; assertBuildStatus ( UNSTABLE , b ) ; assertTrue ( "Artifact<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>published<seq2seq4repair_space>even<seq2seq4repair_space>when<seq2seq4repair_space>the<seq2seq4repair_space>build<seq2seq4repair_space>is<seq2seq4repair_space>unstable" , new File ( repo , "test//test//1.0-SNAPSHOT//test-1.0-SNAPSHOT.jar" ) . exists ( ) ) ; } }

Fix:
m2 . setScm ( new org . jvnet . hudson . test . ExtractResourceSCM ( m2 . getClass ( ) . getResource ( "maven-test-failure-findbugs.zip" ) ) ) ;
Buggy code:
public class ManagedDMRContentTypeAddHandler implements OperationStepHandler { private final ContentRepository contentRepository ; private final String childType ; public ManagedDMRContentTypeAddHandler ( final ContentRepository contentRepository , String childType ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { PathElement pe = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) . getLastElement ( ) ; ModelNode hashNode = ManagedDMRContentTypeResourceDefinition . HASH . validateOperation ( operation ) ; byte [ ] hash = ( hashNode . isDefined ( ) ) ? hashNode . asBytes ( ) : null ; ManagedDMRContentTypeResource resource = new ManagedDMRContentTypeResource ( pe , childType , hash , contentRepository ) ; context . addResource ( EMPTY_ADDRESS , resource ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class RestTemplateIntegrationTests extends AbstractJettyServerTestCase { private RestTemplate template ; @ Before public void createTemplate ( ) { } @ Test public void getString ( ) { } @ Test public void getEntity ( ) { } @ Test public void getNoResponse ( ) { } @ Test public void getNoContentTypeHeader ( ) throws UnsupportedEncodingException { } @ Test public void getNoContent ( ) { } @ Test public void getNotModified ( ) { } @ Test public void postForLocation ( ) throws URISyntaxException { } @ Test public void postForLocationEntity ( ) throws URISyntaxException { } @ Test public void postForObject ( ) throws URISyntaxException { } @ Test public void notFound ( ) { } @ Test public void serverError ( ) { } @ Test public void optionsForAllow ( ) throws URISyntaxException { } @ Test public void uri ( ) throws InterruptedException , URISyntaxException { } @ Test public void multipart ( ) throws UnsupportedEncodingException { } @ Test public void exchangeGet ( ) throws Exception { } @ Test public void exchangePost ( ) throws Exception { } @ Test public void jsonPostForObject ( ) throws URISyntaxException { } @ Test public void jsonPostForObjectWithJacksonView ( ) throws URISyntaxException { HttpHeaders entityHeaders = new HttpHeaders ( ) ; entityHeaders . setContentType ( new MediaType ( "application" , "json" , Charset . forName ( "UTF-8" ) ) ) ; RestTemplateIntegrationTests . MySampleBean bean = new RestTemplateIntegrationTests . MySampleBean ( "with" , "with" , "without" ) ; MappingJacksonValue jacksonValue = new MappingJacksonValue ( bean ) ; jacksonValue . setSerializationView ( RestTemplateIntegrationTests . MyJacksonView1 . class ) ; HttpEntity < MappingJacksonValue > entity = new HttpEntity < MappingJacksonValue > ( jacksonValue , entityHeaders ) ; String s = template . postForObject ( ( ( baseUrl ) + "//jsonpost" ) , entity , String . class , "post" ) ; assertTrue ( s . contains ( "\"with1\":\"with\"" ) ) ; assertFalse ( s . contains ( "\"with2\":\"with\"" ) ) ; <START_BUG> assertTrue ( s . contains ( "\"without\":\"without\"" ) ) ; <END_BUG> } @ Test public void serverPort ( ) { } public interface MyJacksonView1 { } public interface MyJacksonView2 { } public static class MySampleBean { @ JsonView ( RestTemplateIntegrationTests . MyJacksonView1 . class ) private String with1 ; @ JsonView ( RestTemplateIntegrationTests . MyJacksonView2 . class ) private String with2 ; private String without ; private MySampleBean ( ) { } private MySampleBean ( String with1 , String with2 , String without ) { } public String getWith1 ( ) { } public void setWith1 ( String with1 ) { } public String getWith2 ( ) { } public void setWith2 ( String with2 ) { } public String getWithout ( ) { } public void setWithout ( String without ) { } } }

Fix:
assertFalse ( s . contains ( "\"without\":\"without\"" ) ) ;
Buggy code:
public class StandardJMeterEngine implements Serializable , Runnable , JMeterEngine , JMeterThreadMonitor { private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.engine" ) ; private static long WAIT_TO_DIE = 5 * 1000 ; Map allThreads ; boolean running = false ; HashTree test ; SearchByClass testListeners ; String host = null ; ListenerNotifier notifier ; public StandardJMeterEngine ( ) { } public StandardJMeterEngine ( String host ) { } public void configure ( HashTree testTree ) { } public void setHost ( String host ) { } protected HashTree getTestTree ( ) { } protected void compileTree ( ) { } public void runTest ( ) throws JMeterEngineException { } private void removeThreadGroups ( List elements ) { } protected void setMode ( ) { } protected void notifyTestListenersOfStart ( ) { } protected void notifyTestListenersOfEnd ( ) { } private ListedHashTree cloneTree ( ListedHashTree tree ) { <START_BUG> TreeCloner cloner = new TreeCloner ( false ) ; <END_BUG> tree . traverse ( cloner ) ; return cloner . getClonedTree ( ) ; } public void reset ( ) { } public synchronized void threadFinished ( JMeterThread thread ) { } public synchronized void stopTest ( ) { } public void run ( ) { } private void verifyThreadsStopped ( ) { } private void tellThreadsToStop ( ) { } }

Fix:
TreeCloner cloner = new TreeCloner ( true ) ;
Buggy code:
public class MaxTimestamp extends JobConfig implements Tool { private static class MyMapper extends Mapper < LongWritable , Text , LongWritable , LongWritable > { private final LongWritable ONE = new LongWritable ( 1 ) ; private static final LongWritable VAL_OUT = new LongWritable ( 1 ) ; private JsonParser parser ; @ Override protected void setup ( Context context ) throws IOException , InterruptedException { } @ Override protected void cleanup ( Context context ) throws IOException , InterruptedException { } @ Override protected void map ( LongWritable key , Text value , Context context ) throws IOException , InterruptedException { } } private static class MyCombiner extends Reducer < LongWritable , LongWritable , LongWritable , LongWritable > { private final LongWritable VAL_OUT = new LongWritable ( 0L ) ; @ Override protected void reduce ( LongWritable key , Iterable < LongWritable > values , Context context ) throws IOException , InterruptedException { } } private static class MyReducer extends Reducer < LongWritable , LongWritable , NullWritable , NullWritable > { private final LongWritable VAL_OUT = new LongWritable ( 0L ) ; @ Override protected void reduce ( LongWritable key , Iterable < LongWritable > values , Context context ) throws IOException , InterruptedException { } } @ Override public int run ( String [ ] args ) throws Exception { } public static void main ( String [ ] args ) { try { <START_BUG> ToolRunner . run ( new CountAnchor ( ) , args ) ; <END_BUG> } catch ( Exception e ) { e . printStackTrace ( ) ; } } }

Fix:
ToolRunner . run ( new MaxTimestamp ( ) , args ) ;