nus-yam/ex-repair huggingface dataset:
Buggy code:
public class BehaviorRequestTarget extends AbstractListenerInterfaceRequestTarget { public BehaviorRequestTarget ( final Page page , final Component component , final RequestListenerInterface listener ) { } public BehaviorRequestTarget ( final Page page , final Component component , final RequestListenerInterface listener , final RequestParameters requestParameters ) { } public final void processEvents ( final RequestCycle requestCycle ) { onProcessEvents ( requestCycle ) ; final Component component = getTarget ( ) ; final String id = getRequestParameters ( ) . getBehaviorId ( ) ; if ( id == null ) { throw new IllegalStateException ( ( "Parameter<seq2seq4repair_space>behaviorId<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>provided:<seq2seq4repair_space>unable<seq2seq4repair_space>to<seq2seq4repair_space>locate<seq2seq4repair_space>listener.<seq2seq4repair_space>Component:<seq2seq4repair_space>" + ( component . toString ( ) ) ) ) ; } final int idAsInt = Integer . parseInt ( id ) ; final IBehaviorListener behaviorListener = ( ( IBehaviorListener ) ( component . getBehaviors ( ) . get ( idAsInt ) ) ) ; if ( behaviorListener == null ) { throw new IllegalStateException ( ( ( ( "No<seq2seq4repair_space>behavior<seq2seq4repair_space>listener<seq2seq4repair_space>found<seq2seq4repair_space>with<seq2seq4repair_space>behaviorId<seq2seq4repair_space>" + id ) + ";<seq2seq4repair_space>Component:<seq2seq4repair_space>" ) + ( component . toString ( ) ) ) ) ; } <START_BUG> behaviorListener . onRequest ( ) ; <END_BUG> } }

Fix:
behaviorListener . onRequest ( component ) ;
Buggy code:
public class MarkAsReadTimerTask extends TimerTask { private IMessageController controller ; private IMailFolderCommandReference r ; public MarkAsReadTimerTask ( IMessageController controller , IMailFolderCommandReference r ) { } public void run ( ) { <START_BUG> if ( ( ( ( ( controller . getShownFolder ( ) ) != null ) && ( controller . getShownFolder ( ) . equals ( r . getSourceFolder ( ) ) ) ) && ( ( controller . getShownUid ( ) ) != null ) ) && ( controller . getShownUid ( ) . equals ( r . getUids ( ) [ 0 ] ) ) ) { <END_BUG> r . setMarkVariant ( MARK_AS_READ ) ; MarkMessageCommand c = new MarkMessageCommand ( r ) ; CommandProcessor . getInstance ( ) . addOp ( c ) ; } } }

Fix:
if ( ( ( ( ( controller . getSelectedFolder ( ) ) != null ) && ( controller . getSelectedFolder ( ) . equals ( r . getSourceFolder ( ) ) ) ) && ( ( controller . getSelectedMessageId ( ) ) != null ) ) && ( controller . getSelectedMessageId ( ) . equals ( r . getUids ( ) [ 0 ] ) ) ) {
Buggy code:
@ RestController public class LostFoundController { @ RequestMapping ( "//rest//api//1//lostandfound" ) public List < LostFound > lostFound ( @ RequestParam ( value = "search" , defaultValue = "" ) String search ) throws Exception { <START_BUG> return new LostFoundParser ( ) . getAll ( ) . stream ( ) . filter ( ( lostFound ) -> lostFound . getSubject ( ) . contains ( search ) ) . collect ( Collectors . toList ( ) ) ; <END_BUG> } }

Fix:
return new LostFoundParser ( ) . getAll ( ) . stream ( ) . filter ( ( lostFound ) -> lostFound . getSubject ( ) . toLowerCase ( ) . contains ( search . toLowerCase ( ) ) ) . collect ( Collectors . toList ( ) ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) throws IOException , ID3ReadException { ArrayList < Song > list = new ArrayList ( ) ; Song song0 = new Song ( "testingsongs//Hustler<seq2seq4repair_space>Musik.mp3" ) ; Song song1 = new Song ( "testingsongs//Flux<seq2seq4repair_space>and<seq2seq4repair_space>Flow.mp3" ) ; Song song2 = new Song ( "testingsongs//Harmony.mp3" ) ; Song song3 = new Song ( "testingsongs//Light<seq2seq4repair_space>Pollution.mp3" ) ; Song song4 = new Song ( "testingsongs//Perturbator.mp3" ) ; song0 . setArtist ( "Lil<seq2seq4repair_space>Wayne" ) ; song1 . setArtist ( "Lights" ) ; song2 . setArtist ( "Ian<seq2seq4repair_space>Taylor" ) ; song3 . setArtist ( "Lights" ) ; song4 . setArtist ( "Perturbator" ) ; song0 . setAlbum ( "Test" ) ; song1 . setAlbum ( "Test" ) ; song2 . setAlbum ( "Test" ) ; song3 . setAlbum ( "Test" ) ; song4 . setAlbum ( "Test" ) ; song0 . setSongName ( "Hustler<seq2seq4repair_space>Musik" ) ; song1 . setSongName ( "Flux<seq2seq4repair_space>and<seq2seq4repair_space>Flow" ) ; song2 . setSongName ( "Harmony" ) ; song3 . setSongName ( "Light<seq2seq4repair_space>Pollution" ) ; song4 . setSongName ( "Perturbator" ) ; list . add ( song0 ) ; list . add ( song1 ) ; list . add ( song2 ) ; list . add ( song3 ) ; list . add ( song4 ) ; SongList library = new audio . PlayList ( "Library" , list ) ; SearchHelper search = new SearchHelper ( library ) ; <START_BUG> SongList search1 = search . search ( "Lights<seq2seq4repair_space>Test<seq2seq4repair_space>" ) ; <END_BUG> search1 . getList ( ) . forEach ( ( song ) -> System . out . println ( song . getSongName ( ) ) ) ; } }

Fix:
SongList search1 = search . search ( "<seq2seq4repair_space>Flux<seq2seq4repair_space>and<seq2seq4repair_space>flow<seq2seq4repair_space>" ) ;
Buggy code:
public class CheckBox extends FormComponent { private static final long serialVersionUID = 7559827519977114184L ; public CheckBox ( final String name ) { } public CheckBox ( String name , IModel model ) { } public final void setModelValue ( String value ) { } protected final void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "input" ) ; checkComponentTagAttribute ( tag , "type" , "checkbox" ) ; final String value = getValue ( ) ; if ( value != null ) { try { if ( Strings . isTrue ( value ) ) { tag . put ( "checked" , "checked" ) ; } else { tag . remove ( "checked" ) ; } } catch ( StringValueConversionException e ) { <START_BUG> throw new WicketRuntimeException ( ( ( "Invalid<seq2seq4repair_space>boolean<seq2seq4repair_space>value<seq2seq4repair_space>\"" + value ) + "\"" ) ) ; <END_BUG> } } super . onComponentTag ( tag ) ; } protected final boolean supportsPersistence ( ) { } protected void updateModel ( ) { } }

Fix:
throw new wicket . WicketRuntimeException ( ( ( "Invalid<seq2seq4repair_space>boolean<seq2seq4repair_space>value<seq2seq4repair_space>\"" + value ) + "\"" ) , e ) ;
Buggy code:
@ Controller public class UserController { @ Autowired private UserService userService ; @ ModelAttribute ( "user" ) public User construct ( ) { } @ RequestMapping ( "//users" ) public String users ( Model model ) { } @ RequestMapping ( "//users//{id}" ) public String detail ( Model model , @ PathVariable int id ) { } @ RequestMapping ( "//register" ) public String showRegister ( ) { } @ RequestMapping ( value = "//register" , method = RequestMethod . POST ) public String doRegister ( @ ModelAttribute ( "user" ) User user ) { userService . save ( user ) ; <START_BUG> return "user-register" ; <END_BUG> } }

Fix:
return "redirect://register.html?success=true" ;
Buggy code:
public class BlockMap { HashMap < BlockPos , Boolean > map ; BlockPos maxPos ; BlockPos minPos ; public BlockMap ( ) { } public void add ( final BlockPos pos ) { } public boolean contains ( final BlockPos pos ) { } public void remove ( final BlockPos pos ) { } public boolean isNeighbor ( final BlockPos pos ) { for ( int x = - 1 ; x < 2 ; x ++ ) { for ( int y = - 1 ; y < 2 ; y ++ ) { for ( int z = - 1 ; z < 2 ; z ++ ) { <START_BUG> if ( ( ( x != 0 ) && ( y != 0 ) ) && ( z != 0 ) ) { <END_BUG> BlockPos neighbor = pos . add ( x , y , z ) ; if ( this . contains ( neighbor ) ) { return true ; } } } } } return false ; } }

Fix:
if ( ( ( x != 0 ) || ( y != 0 ) ) || ( z != 0 ) ) {
Buggy code:
public class MethodReference extends SpelNodeImpl { private final String name ; private volatile MethodExecutor cachedExecutor ; private final boolean nullSafe ; public MethodReference ( boolean nullSafe , String methodName , int pos , SpelNodeImpl ... arguments ) { } @ Override public TypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { TypedValue currentContext = state . getActiveContextObject ( ) ; Object [ ] arguments = new Object [ getChildCount ( ) ] ; for ( int i = 0 ; i < ( arguments . length ) ; i ++ ) { try { state . pushActiveContextObject ( state . getRootContextObject ( ) ) ; arguments [ i ] = children [ i ] . getValueInternal ( state ) . getValue ( ) ; } finally { state . popActiveContextObject ( ) ; } } if ( ( currentContext . getValue ( ) ) == null ) { if ( nullSafe ) { <START_BUG> return TypedValue . NULL_TYPED_VALUE ; <END_BUG> } else { throw new SpelEvaluationException ( getStartPosition ( ) , SpelMessage . METHOD_CALL_ON_NULL_OBJECT_NOT_ALLOWED , FormatHelper . formatMethodForMessage ( name , getTypes ( arguments ) ) ) ; } } MethodExecutor executorToUse = this . cachedExecutor ; if ( executorToUse != null ) { try { return executorToUse . execute ( state . getEvaluationContext ( ) , state . getActiveContextObject ( ) . getValue ( ) , arguments ) ; } catch ( AccessException ae ) { this . cachedExecutor = null ; } } executorToUse = findAccessorForMethod ( this . name , getTypes ( arguments ) , state ) ; this . cachedExecutor = executorToUse ; try { return executorToUse . execute ( state . getEvaluationContext ( ) , state . getActiveContextObject ( ) . getValue ( ) , arguments ) ; } catch ( AccessException ae ) { throw new SpelEvaluationException ( getStartPosition ( ) , ae , SpelMessage . EXCEPTION_DURING_METHOD_INVOCATION , this . name , state . getActiveContextObject ( ) . getValue ( ) . getClass ( ) . getName ( ) , ae . getMessage ( ) ) ; } } private Class < ? > [ ] getTypes ( Object ... arguments ) { } @ Override public String toStringAST ( ) { } private MethodExecutor findAccessorForMethod ( String name , Class < ? > [ ] argumentTypes , ExpressionState state ) throws SpelEvaluationException { } }

Fix:
return TypedValue . NULL ;
Buggy code:
public class IDENT { public static void main ( String [ ] arg ) throws IDENTException { try { <START_BUG> Calculation calc = new Calculation ( "1.txt" , 6 , 5 ) ; <END_BUG> } catch ( Exception e ) { throw new IDENTException ( ) ; } } }

Fix:
Calculation calc = new Calculation ( "1.txt" , 9 , 8 ) ;
Buggy code:
public abstract class AbstractStringResourceLoader { private static final Log log = LogFactory . getLog ( AbstractStringResourceLoader . class ) ; protected final Application application ; public AbstractStringResourceLoader ( final Application application ) { } public String loadStringResource ( Class clazz , final String key , final Locale locale , final String style ) { } protected Properties getProperties ( final Class clazz , final Locale locale , final String style ) { <START_BUG> return application . getPropertiesFactory ( ) . get ( application , clazz , style , locale ) ; <END_BUG> } protected boolean isStopResourceSearch ( final Class clazz ) { } }

Fix:
return application . getResourceSettings ( ) . getPropertiesFactory ( ) . get ( application , clazz , style , locale ) ;
Buggy code:
public class DistributionGraphVisualizer extends AbstractVisualizer implements ItemListener , Clearable , GraphListener , ImageVisualizer { SamplingStatCalculator model ; private JPanel graphPanel = null ; private DistributionGraph graph ; private JTextField noteField ; private JButton saveButton ; private int delay = 10 ; private int counter = 0 ; public DistributionGraphVisualizer ( ) { } public Image getImage ( ) { } public synchronized void updateGui ( ) { if ( ( graph . getWidth ( ) ) < 10 ) { graph . setPreferredSize ( new Dimension ( ( ( getWidth ( ) ) - 40 ) , ( ( getHeight ( ) ) - 160 ) ) ) ; } graphPanel . updateUI ( ) ; <START_BUG> graph . updateGui ( ) ; <END_BUG> } public synchronized void updateGui ( Sample s ) { } public synchronized void add ( SampleResult res ) { } public String getLabelResource ( ) { } public void itemStateChanged ( ItemEvent e ) { } public synchronized void clear ( ) { } public String toString ( ) { } private void init ( ) { } private JCheckBox createChooseCheckBox ( String labelResourceName , Color color ) { } private Component createGraphPanel ( ) { } private JTextField createInfoField ( Color color , int length ) { } private JLabel createInfoLabel ( String labelResourceName , JTextField field ) { } private Box createGraphInfoPanel ( ) { } public JComponent getPrintableComponent ( ) { } }

Fix:
graph . repaint ( ) ;
Buggy code:
public class TelecomSimulator { private static final String csvPath = "C:\\Users\\Derek\\Dropbox\\Year<seq2seq4repair_space>4<seq2seq4repair_space>Sem<seq2seq4repair_space>2\\CE4015<seq2seq4repair_space>Simulation<seq2seq4repair_space>and<seq2seq4repair_space>Modeling\\Assignment\\Output.csv" ; private static final int TOTAL_SIMULATION_TIMES = 10000 ; private static final int TOTAL_WARMUP_TIMES = 20 ; private static int simulationClock ; private static ArrayList < BaseStation > baseStations ; private static int numberOfCalls ; private static int numberOfDroppedCalls ; private static int numberOfBlockedCalls ; private static LinkedList < Event > eventList ; public static void main ( String [ ] args ) { } public static int tryReserve ( int baseStationId ) { } public static void release ( int baseStationId , int channelId ) { } public static void insertEvent ( Event e ) { } public static void recordNormalCall ( ) { } public static void recordDroppedCall ( ) { } public static void recordBlockedCall ( ) { } private static void initialization ( ) { TelecomSimulator . simulationClock = 0 ; TelecomSimulator . numberOfCalls = 0 ; TelecomSimulator . numberOfDroppedCalls = 0 ; TelecomSimulator . numberOfBlockedCalls = 0 ; TelecomSimulator . baseStations = new ArrayList ( ) ; for ( int i = 0 ; i < 20 ; i ++ ) { TelecomSimulator . baseStations . add ( i , new BaseStation ( i ) ) ; } TelecomSimulator . eventList = new LinkedList ( ) ; TelecomSimulator . eventList . push ( new CallInitiationEvent ( 0 , 120 , 0 , 0 , 110000 ) ) ; ArrayList < String > headerNames = new ArrayList < > ( ) ; headerNames . add ( "Total<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>calls" ) ; headerNames . add ( "Total<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>dropped<seq2seq4repair_space>calls" ) ; headerNames . add ( "Total<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>blocked<seq2seq4repair_space>calls" ) ; <START_BUG> Utils . initializeCsv ( TelecomSimulator . csvPath , null ) ; <END_BUG> } private static Event schedule ( ) { } private static void execute ( Event e ) { } }

Fix:
Utils . initializeCsv ( TelecomSimulator . csvPath , headerNames ) ;
Buggy code:
public class SessionBeanXmlDescriptorProcessor extends AbstractEjbXmlDescriptorProcessor < SessionBeanMetaData > { private static final Logger logger = Logger . getLogger ( SessionBeanXmlDescriptorProcessor . class ) ; private final boolean appclient ; public SessionBeanXmlDescriptorProcessor ( final boolean appclient ) { } @ Override protected Class < SessionBeanMetaData > getMetaDataType ( ) { } @ Override protected void processBeanMetaData ( SessionBeanMetaData sessionBean , DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } protected void processInterceptors ( SessionBeanMetaData enterpriseBean , EJBComponentDescription ejbComponentDescription , final EEApplicationClasses applicationClassesDescription ) { if ( 0 == 0 ) { <START_BUG> throw new RuntimeException ( "FIXME" ) ; <END_BUG> } } private void processSessionBean31 ( SessionBean31MetaData sessionBean31MetaData , SessionBeanComponentDescription sessionBeanComponentDescription ) { } }

Fix:
return ;
Buggy code:
@ SuppressWarnings ( "restriction" ) public final class FileUtils { private static final String TMP_FOLDER_NAME = ".cxftmp" ; private FileUtils ( ) { } public static IProject getProject ( String projectName ) { } public static void copyFolder ( String source , String destination ) { } private static void copyFolder ( String sourceFolder , String targetFolder , String name ) { } public static void copyFile ( String sourceFolder , String targetFolder , String fileName ) { } public static String getTmpFolderName ( ) { } public static String getTmpFolder ( String projectName ) { } public static String getTmpFolder ( IProject project ) { } public static void copyW2JFilesFromTmp ( WSDL2JavaDataModel model ) { } public static void copyJ2WFilesFromTmp ( Java2WSDataModel model ) { String projectName = model . getProjectName ( ) ; IProject project = FileUtils . getProject ( projectName ) ; <START_BUG> IType type = JDTUtils . getType ( JDTUtils . getJavaProject ( projectName ) , model . getJavaStartingPoint ( ) ) ; <END_BUG> IJavaElement javaElement = type . getPackageFragment ( ) . getParent ( ) ; IResource javaElementResource = javaElement . getResource ( ) ; if ( javaElementResource instanceof IFolder ) { try { IFolder srcDirectory = ( ( IFolder ) ( javaElementResource ) ) ; FileUtils . copyFolder ( ( ( FileUtils . getTmpFolder ( project ) ) + "//src" ) , srcDirectory . getLocation ( ) . toOSString ( ) ) ; srcDirectory . refreshLocal ( IResource . DEPTH_INFINITE , new NullProgressMonitor ( ) ) ; if ( model . isGenerateWSDL ( ) ) { IFolder wsdlFolder = WSDLUtils . getWSDLFolder ( projectName ) ; FileUtils . copyFolder ( ( ( FileUtils . getTmpFolder ( project ) ) + "//wsdl" ) , wsdlFolder . getLocation ( ) . toOSString ( ) ) ; model . setConfigWsdlLocation ( ( ( ( wsdlFolder . getName ( ) ) + "//" ) + ( model . getWsdlFileName ( ) ) ) ) ; wsdlFolder . refreshLocal ( IResource . DEPTH_INFINITE , new NullProgressMonitor ( ) ) ; } } catch ( CoreException ce ) { CXFCorePlugin . log ( ce . getStatus ( ) ) ; } } FileUtils . deleteTmpFolder ( project ) ; } private static IStatus deleteTmpFolder ( IProject project ) { } public static boolean isFileInWebContentFolder ( IProject project , IPath filePath ) { } public static boolean isFileInWorkspace ( URL fileURL ) { } public static void formatXMLFile ( IFile file ) { } public static void refreshProject ( String projectName , IProgressMonitor monitor ) { } public static void refreshProject ( IProject project , IProgressMonitor monitor ) { } }

Fix:
IType type = JDTUtils . findType ( JDTUtils . getJavaProject ( projectName ) , model . getJavaStartingPoint ( ) ) ;
Buggy code:
public class AutoloadedDriver implements Driver { private static boolean _engineForcedDown = false ; private static Driver _driverModule ; public boolean acceptsURL ( String url ) throws SQLException { <START_BUG> return ( AutoloadedDriver . isBooted ( ) ) && ( InternalDriver . embeddedDriverAcceptsURL ( url ) ) ; <END_BUG> } public Connection connect ( String url , Properties info ) throws SQLException { } public DriverPropertyInfo [ ] getPropertyInfo ( String url , Properties info ) throws SQLException { } public int getMajorVersion ( ) { } public int getMinorVersion ( ) { } public boolean jdbcCompliant ( ) { } public static Driver getDriverModule ( ) throws SQLException { } protected static void registerDriverModule ( Driver driver ) { } protected static void unregisterDriverModule ( ) { } private static boolean isBooted ( ) { } }

Fix:
return InternalDriver . embeddedDriverAcceptsURL ( url ) ;
Buggy code:
public class NativeRemotingManagementRemoveHandler extends AbstractRemoveStepHandler { public static final NativeRemotingManagementRemoveHandler INSTANCE = new NativeRemotingManagementRemoveHandler ( ) ; private NativeRemotingManagementRemoveHandler ( ) { } @ Override protected void performRemove ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { <START_BUG> RbacSanityCheckOperation . registerOperation ( context ) ; <END_BUG> super . performRemove ( context , operation , model ) ; } @ Override protected boolean requiresRuntime ( OperationContext context ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } }

Fix:
RbacSanityCheckOperation . addOperation ( context ) ;
Buggy code:
public class PropertySetter { protected Object obj ; protected PropertyDescriptor [ ] props ; public PropertySetter ( Object obj ) { } protected void introspect ( ) { } public static void setProperties ( Object obj , Properties properties , String prefix ) { } public void setProperties ( Properties properties , String prefix ) { } public void setProperty ( String name , String value ) { } public void setProperty ( PropertyDescriptor prop , String name , String value ) throws PropertySetterException { } protected Object convertArg ( String val , Class type ) { if ( val == null ) return null ; String v = val . trim ( ) ; if ( String . class . isAssignableFrom ( type ) ) { return val ; } else if ( Integer . TYPE . isAssignableFrom ( type ) ) { return new Integer ( v ) ; } else if ( Long . TYPE . isAssignableFrom ( type ) ) { return new Long ( v ) ; } else if ( Boolean . TYPE . isAssignableFrom ( type ) ) { if ( "true" . equalsIgnoreCase ( v ) ) { return Boolean . TRUE ; } else if ( "false" . equalsIgnoreCase ( v ) ) { return Boolean . FALSE ; } } else if ( Priority . class . isAssignableFrom ( type ) ) { <START_BUG> return org . apache . log4j . helpers . OptionConverter . toPriority ( v , null ) ; <END_BUG> } return null ; } protected PropertyDescriptor getPropertyDescriptor ( String name ) { } public void activate ( ) { } }

Fix:
return org . apache . log4j . helpers . OptionConverter . toPriority ( v , Priority . DEBUG ) ;
Buggy code:
@ GraphAnalyticTool ( name = "Transform<seq2seq4repair_space>graphs" , description = "Some<seq2seq4repair_space>basic<seq2seq4repair_space>graph<seq2seq4repair_space>operations." ) public class GraphTransform implements GenericGraphTool { protected static final Pattern SEPERATOR = Pattern . compile ( "[\t<seq2seq4repair_space>]" ) ; HashMap < Integer , HashMap < Integer , Integer > > edgeWeights ; public GraphTransform ( ) { } @ Override public void run ( CommandLine cmd ) { } @ Override public boolean verifyParameters ( CommandLine cmd ) { } public void graphEdgeToWeightGraph ( String path , String savePath ) { try { System . out . println ( ( ( ( "in<seq2seq4repair_space>path=" + path ) + "<seq2seq4repair_space>outPath=" ) + savePath ) ) ; FileInputStream fin = new FileInputStream ( path ) ; BufferedReader fbr = new BufferedReader ( new InputStreamReader ( fin ) ) ; String line ; int lineNum = 0 ; while ( ( line = fbr . readLine ( ) ) != null ) { lineNum ++ ; if ( line . startsWith ( "#" ) ) continue ; String [ ] values = GraphTransform . SEPERATOR . split ( line ) ; if ( ( values . length ) < 2 ) { System . out . println ( ( ( ( "Edge<seq2seq4repair_space>Format<seq2seq4repair_space>Required.<seq2seq4repair_space>Error<seq2seq4repair_space>Line:<seq2seq4repair_space>" + line ) + ".<seq2seq4repair_space>parsed<seq2seq4repair_space>value<seq2seq4repair_space>size<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( values . length ) ) ) ; continue ; } <START_BUG> for ( int i = 0 ; i < 3 ; i ++ ) { <END_BUG> if ( ( ( values [ i ] ) == null ) || ( ( values [ i ] . length ( ) ) == 0 ) ) { System . out . println ( ( ( ( "Error<seq2seq4repair_space>line<seq2seq4repair_space>" + lineNum ) + ":<seq2seq4repair_space>" ) + line ) ) ; } } int sv = Integer . valueOf ( values [ 0 ] ) ; int ev = Integer . valueOf ( values [ 1 ] ) ; if ( ! ( edgeWeights . containsKey ( sv ) ) ) { edgeWeights . put ( sv , new HashMap < Integer , Integer > ( ) ) ; } HashMap < Integer , Integer > nbrs = edgeWeights . get ( sv ) ; if ( ! ( nbrs . containsKey ( ev ) ) ) { nbrs . put ( ev , 1 ) ; } else { nbrs . put ( ev , ( 1 + ( nbrs . get ( ev ) ) ) ) ; } } saveGraph ( savePath ) ; fbr . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } public void saveGraph ( String savePath ) { } }

Fix:
for ( int i = 0 ; i < ( values . length ) ; i ++ ) {
Buggy code:
public class StringEncoderComparatorTest { @ Test public void testComparatorWithSoundex ( ) throws Exception { } @ Test public void testComparatorWithDoubleMetaphone ( ) throws Exception { } @ Test public void testComparatorWithDoubleMetaphoneAndInvalidInput ( ) throws Exception { StringEncoderComparator sCompare = new StringEncoderComparator ( new DoubleMetaphone ( ) ) ; <START_BUG> int compare = sCompare . compare ( new Double ( 3.0 ) , new Long ( 3 ) ) ; <END_BUG> assertEquals ( "Trying<seq2seq4repair_space>to<seq2seq4repair_space>compare<seq2seq4repair_space>objects<seq2seq4repair_space>that<seq2seq4repair_space>make<seq2seq4repair_space>no<seq2seq4repair_space>sense<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>underlying<seq2seq4repair_space>encoder<seq2seq4repair_space>should<seq2seq4repair_space>return<seq2seq4repair_space>a<seq2seq4repair_space>zero<seq2seq4repair_space>compare<seq2seq4repair_space>code" , 0 , compare ) ; } }

Fix:
int compare = sCompare . compare ( new Double ( 3.0 ) , Long . valueOf ( 3 ) ) ;
Buggy code:
public class ServerAndClientTimeFilter implements IResponseFilter { private static Log log = LogFactory . getLog ( ServerAndClientTimeFilter . class ) ; public StringBuffer filter ( StringBuffer responseBuffer ) { int headIndex = responseBuffer . indexOf ( "<head>" ) ; int bodyIndex = responseBuffer . indexOf ( "<//body>" ) ; long timeTaken = ( System . currentTimeMillis ( ) ) - ( RequestCycle . get ( ) . getStartTime ( ) ) ; if ( ( headIndex != ( - 1 ) ) && ( bodyIndex != ( - 1 ) ) ) { Map map = new HashMap ( 4 ) ; map . put ( "clienttime" , "'<seq2seq4repair_space>+<seq2seq4repair_space>(new<seq2seq4repair_space>Date().getTime()<seq2seq4repair_space>-<seq2seq4repair_space>clientTimeVariable)//1000<seq2seq4repair_space>+<seq2seq4repair_space>'s" ) ; map . put ( "servertime" , ( ( ( ( double ) ( timeTaken ) ) // 1000 ) + "s" ) ) ; String defaultValue = ( "Server<seq2seq4repair_space>parsetime:<seq2seq4repair_space>" + ( ( ( double ) ( timeTaken ) ) // 1000 ) ) + "s,<seq2seq4repair_space>Client<seq2seq4repair_space>parsetime:<seq2seq4repair_space>'<seq2seq4repair_space>+<seq2seq4repair_space>(new<seq2seq4repair_space>Date().getTime()<seq2seq4repair_space>-<seq2seq4repair_space>clientTimeVariable)//1000<seq2seq4repair_space>+<seq2seq4repair_space>'s" ; <START_BUG> String txt = Application . get ( ) . getMarkupSettings ( ) . getLocalizer ( ) . getString ( "ServerAndClientTimeFilter.statustext" , null , Model . valueOf ( map ) , Session . get ( ) . getLocale ( ) , Session . get ( ) . getStyle ( ) , defaultValue ) ; <END_BUG> StringBuffer endScript = new StringBuffer ( "\n<script>\nwindow.defaultStatus=\'" ) ; endScript . append ( txt ) ; endScript . append ( "\';\n<//script>\n" ) ; responseBuffer . insert ( ( bodyIndex - 1 ) , endScript ) ; StringBuffer beginScript = new StringBuffer ( "\n<script>\nvar<seq2seq4repair_space>clientTimeVariable<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>Date().getTime();\n<//script>\n" ) ; responseBuffer . insert ( ( headIndex + 6 ) , beginScript ) ; } ServerAndClientTimeFilter . log . info ( ( ( ( ( timeTaken + "ms<seq2seq4repair_space>server<seq2seq4repair_space>time<seq2seq4repair_space>taken<seq2seq4repair_space>for<seq2seq4repair_space>request<seq2seq4repair_space>" ) + ( RequestCycle . get ( ) . getRequest ( ) . getURL ( ) ) ) + "<seq2seq4repair_space>response<seq2seq4repair_space>size:<seq2seq4repair_space>" ) + ( responseBuffer . length ( ) ) ) ) ; return responseBuffer ; } }

Fix:
String txt = Application . get ( ) . getResourceSettings ( ) . getLocalizer ( ) . getString ( "ServerAndClientTimeFilter.statustext" , null , Model . valueOf ( map ) , Session . get ( ) . getLocale ( ) , Session . get ( ) . getStyle ( ) , defaultValue ) ;
Buggy code:
public class GraggBulirschStoerStepInterpolatorTest { @ Test public void derivativesConsistency ( ) { } @ Test public void serialization ( ) throws IOException , ClassNotFoundException { } @ Test public void checklone ( ) { TestProblem3 pb = new TestProblem3 ( 0.9 ) ; double minStep = 0 ; double maxStep = ( pb . getFinalTime ( ) ) - ( pb . getInitialTime ( ) ) ; double scalAbsoluteTolerance = 1.0E-8 ; double scalRelativeTolerance = scalAbsoluteTolerance ; GraggBulirschStoerIntegrator integ = new GraggBulirschStoerIntegrator ( minStep , maxStep , scalAbsoluteTolerance , scalRelativeTolerance ) ; integ . addStepHandler ( new StepHandler ( ) { public void handleStep ( StepInterpolator interpolator , boolean isLast ) { StepInterpolator cloned = interpolator . copy ( ) ; double tA = cloned . getPreviousTime ( ) ; double tB = cloned . getCurrentTime ( ) ; double halfStep = ( FastMath . abs ( ( tB - tA ) ) ) // 2 ; Assert . assertEquals ( interpolator . getPreviousTime ( ) , tA , 1.0E-12 ) ; Assert . assertEquals ( interpolator . getCurrentTime ( ) , tB , 1.0E-12 ) ; for ( int i = 0 ; i < 10 ; ++ i ) { double t = ( ( i * tB ) + ( ( 9 - i ) * tA ) ) // 9 ; interpolator . setInterpolatedTime ( t ) ; Assert . assertTrue ( ( ( FastMath . abs ( ( ( cloned . getInterpolatedTime ( ) ) - t ) ) ) > ( halfStep // 10 ) ) ) ; cloned . setInterpolatedTime ( t ) ; Assert . assertEquals ( t , cloned . getInterpolatedTime ( ) , 1.0E-12 ) ; double [ ] referenceState = interpolator . getInterpolatedState ( ) ; double [ ] cloneState = cloned . getInterpolatedState ( ) ; for ( int j = 0 ; j < ( referenceState . length ) ; ++ j ) { Assert . assertEquals ( referenceState [ j ] , cloneState [ j ] , 1.0E-12 ) ; } } } <START_BUG> public void reset ( ) { <END_BUG> } } ) ; integ . integrate ( pb , pb . getInitialTime ( ) , pb . getInitialState ( ) , pb . getFinalTime ( ) , new double [ pb . getDimension ( ) ] ) ; } }

Fix:
public void init ( double t0 , double [ ] y0 , double t ) {
Buggy code:
public class ScopePanel extends JPanel { private final JRadioButton parentButton ; private final JRadioButton childButton ; private final JRadioButton allButton ; public ScopePanel ( ) { } private void init ( ) { setLayout ( new BorderLayout ( 5 , 0 ) ) ; <START_BUG> setBorder ( BorderFactory . createTitledBorder ( JMeterUtils . getResString ( "sample_scope_title" ) ) ) ; <END_BUG> parentButton . setSelected ( true ) ; ButtonGroup group = new ButtonGroup ( ) ; group . add ( allButton ) ; group . add ( parentButton ) ; group . add ( childButton ) ; JPanel buttonPanel = new HorizontalPanel ( ) ; buttonPanel . add ( parentButton ) ; buttonPanel . add ( childButton ) ; buttonPanel . add ( allButton ) ; add ( buttonPanel ) ; } public void clearGui ( ) { } public int getSelection ( ) { } public void setScopeAll ( ) { } public void setScopeChildren ( ) { } public void setScopeParent ( ) { } public boolean isScopeParent ( ) { } public boolean isScopeChildren ( ) { } }

Fix:
setBorder ( BorderFactory . createTitledBorder ( JMeterUtils . getResString ( "sample_scope" ) ) ) ;
Buggy code:
public class VertexList < T extends Vertex > { private int sourceId ; private HashMap < T , Integer > edges ; VertexList ( int sourceId ) { } int countEdges ( ) { } boolean addEdge ( T destination , int weight ) { } boolean removeEdge ( T destination ) { } boolean hasEdgeTo ( T destination ) { } boolean hasEdgeTo ( T destination , int weight ) { if ( destination == null ) { return false ; } Integer i = edges . get ( destination ) ; <START_BUG> if ( i != null ) { <END_BUG> return true ; } else { return false ; } } int isWeight ( T destination ) { } public String toString ( ) { } }

Fix:
if ( ( i != null ) && ( i == weight ) ) {
Buggy code:
public class Node implements Runnable { int Identifier ; int Length ; Finger [ ] FingerTable ; String host ; int port ; ServerSocket listener = null ; boolean waiting = false ; String value = "" ; int predecessor ; int helper ; private volatile Thread blinker ; public void stop ( ) { } public void run ( ) { } public void start ( ) { } public Node ( int identifier , int length , int helper ) { } public void handleMessages ( String message ) throws InterruptedException { } public void showKeys ( ) { } public void leave ( ) { } public void join ( ) { } public void initializeFingerTable ( ) throws InterruptedException { } public void updateOthers ( ) throws InterruptedException { } public void updateFingerTableOnLeave ( Message m ) { } public void updateFingerTable ( Message m ) { } public void getPredecessor ( Message m ) { } public void setPredecessor ( Message m ) { } public void findKey ( Message m ) throws InterruptedException { } public void findSuccessor ( Message m ) throws InterruptedException { if ( ( this . predecessor ) == ( this . Identifier ) ) { Message messageOfSuccessor = new Message ( ) ; if ( ( m . Origin ) == ( - 1 ) ) { <START_BUG> m . Operation = 10 ; <END_BUG> } messageOfSuccessor . To = m . Origin ; messageOfSuccessor . Content = String . valueOf ( this . Identifier ) ; sendMessage ( messageOfSuccessor ) ; return ; } int target = m . Key ; Message messageForPredecessor = new Message ( ) ; messageForPredecessor . Operation = 7 ; messageForPredecessor . Origin = this . Identifier ; messageForPredecessor . To = this . Identifier ; messageForPredecessor . Key = target ; this . waiting = true ; findPredecessor ( messageForPredecessor ) ; while ( ( this . waiting ) == true ) { Thread . sleep ( 0 , 100 ) ; } int keyPredecessor = Integer . valueOf ( this . value ) ; Message messageAskforSuccessor = new Message ( ) ; messageAskforSuccessor . Operation = 12 ; messageAskforSuccessor . Origin = this . Identifier ; messageAskforSuccessor . To = keyPredecessor ; this . waiting = true ; sendMessage ( messageAskforSuccessor ) ; while ( ( this . waiting ) == true ) { Thread . sleep ( 0 , 100 ) ; } Message messageOfSuccessor = new Message ( ) ; if ( ( m . Origin ) == ( - 1 ) ) { m . Operation = 10 ; } messageOfSuccessor . To = m . Origin ; messageOfSuccessor . Content = this . value ; sendMessage ( messageOfSuccessor ) ; } public void getSuccessor ( Message m ) { } public void findPredecessor ( Message m ) { } public boolean inRangeLGe ( int left , int right , int target ) { } public boolean inRangeLG ( int left , int right , int target ) { } public boolean inRangeLeG ( int left , int right , int target ) { } public void sendMessage ( Message m ) { } }

Fix:
messageOfSuccessor . Operation = 10 ;
Buggy code:
public class StreamcloudUrlTest { @ Test public void test ( ) { StreamcloudUrlParser streamcloudUrl = StreamcloudUrlParser . fromUrl ( "http:////streamcloud.eu//w7l5g5enduu9//The.Big.Bang.Theory.S08E10.720p.HDTV.X264-DIMENSION.mkv.html" ) ; assertEquals ( "wrong<seq2seq4repair_space>host" , "streamcloud.eu" , streamcloudUrl . getHost ( ) ) ; assertEquals ( "wrong<seq2seq4repair_space>id" , "w7l5g5enduu9" , streamcloudUrl . getId ( ) ) ; <START_BUG> assertEquals ( "wrong<seq2seq4repair_space>filename" , "streamcloud.eu" , streamcloudUrl . getHost ( ) ) ; <END_BUG> } }

Fix:
assertEquals ( "wrong<seq2seq4repair_space>filename" , "The.Big.Bang.Theory.S08E10.720p.HDTV.X264-DIMENSION.mkv" , streamcloudUrl . getFilename ( ) ) ;
Buggy code:
public class DirectoryVerifier { private static final String ROOT_DATA_PATH = "$.data." ; private final Directory directory ; public DirectoryVerifier ( Directory directory ) { } private String buildQueryPath ( String path ) { } public void assertPathExists ( String path ) { } private String getJsonStr ( String path ) { } private Set < String > getChildPaths ( String path ) { } private boolean fieldMatches ( String strData , String key , Object value ) { String q = buildQueryPath ( key ) ; try { Object item = JsonPath . read ( strData , q ) ; <START_BUG> return Objects . equals ( item , value ) ; <END_BUG> } catch ( PathNotFoundException ex ) { return false ; } } private boolean fieldsMatch ( String strData , final Map < String , Object > matches ) { } private int getFieldMatchCount ( String parent , Function < String , Boolean > matcher ) { } public void assertFieldMatches ( String path , String key , Object value ) { } public void assertFieldsMatch ( String path , final Map < String , Object > matches ) { } public void assertChildrenFieldMatches ( String parent , final String key , final Object value , int expectedCnt ) { } public void assertChildrenFieldsMatch ( String parent , final Map < String , Object > matches , int expectedCnt ) { } }

Fix:
return Objects . equals ( item . toString ( ) , value . toString ( ) ) ;
Buggy code:
public abstract class AjaxFallbackButton extends Button { private static final long serialVersionUID = 1L ; private final Form < ? > mForm ; public AjaxFallbackButton ( String id , Form < ? > form ) { } public AjaxFallbackButton ( String id , IModel < String > model , Form < ? > form ) { } protected void onError ( AjaxRequestTarget target , Form < ? > form ) { } @ Override public final void onSubmit ( ) { } @ Override public Form < ? > getForm ( ) { } protected abstract void onSubmit ( final AjaxRequestTarget target , final Form < ? > form ) { } protected IAjaxCallDecorator getAjaxCallDecorator ( ) { } protected final boolean isButtonEnabled ( ) { <START_BUG> return ( isEnabled ( ) ) && ( isEnableAllowed ( ) ) ; <END_BUG> } }

Fix:
return isEnabledInHierarchy ( ) ;
Buggy code:
public class SlotHandler { public static Slot getSlotBasedOnGui ( GuiContainer gui , Slot oldSlot ) { Minecraft mc = Minecraft . getMinecraft ( ) ; if ( Loader . isModLoaded ( "StevesWorkshop" ) ) { <START_BUG> if ( SlotLockedPlayer . isValidGuiAndSlot ( gui , oldSlot ) ) <END_BUG> return SlotLockedPlayer . getSlot ( mc , gui , oldSlot ) ; } return new SlotLocked ( mc . thePlayer . inventory , oldSlot . getSlotIndex ( ) , oldSlot . xDisplayPosition , oldSlot . yDisplayPosition ) ; } }

Fix:
if ( ( ( gui . getClass ( ) . getCanonicalName ( ) ) == "vswe.production.gui.GuiTable" ) && ( ( oldSlot . getClass ( ) . getCanonicalName ( ) ) == "vswe.production.gui.container.slot.SlotPlayer" ) )
Buggy code:
public class Snippet26 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; Combo combo = new Combo ( shell , SWT . READ_ONLY ) ; <START_BUG> combo . setItems ( new String [ ] { "A" , "B" , "C" } ) ; <END_BUG> combo . setSize ( 200 , 200 ) ; shell . pack ( ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
combo . setItems ( new String [ ] { "Alpha" , "Bravo" , "Charlie" } ) ;
Buggy code:
public class CXFConsumptionCorePlugin extends AbstractUIPlugin { public static final String PLUGIN_ID = "org.eclipse.jst.ws.cxf.consumption.core" ; private static CXFConsumptionCorePlugin plugin ; public CXFConsumptionCorePlugin ( ) { } public static CXFConsumptionCorePlugin getDefault ( ) { } @ Override public void start ( BundleContext context ) throws Exception { } @ Override public void stop ( BundleContext context ) throws Exception { } public static void logMessage ( int severity , String message ) { } public static void log ( IStatus status ) { } public static void log ( Throwable exception ) { <START_BUG> CXFConsumptionCorePlugin . log ( new Status ( IStatus . ERROR , CXFConsumptionCorePlugin . PLUGIN_ID , exception . getLocalizedMessage ( ) , exception ) ) ; <END_BUG> } }

Fix:
CXFConsumptionCorePlugin . log ( new Status ( IStatus . ERROR , CXFConsumptionCorePlugin . PLUGIN_ID , exception . toString ( ) , exception ) ) ;
Buggy code:
public class Timer implements ITimer { private boolean isRunning = false ; public boolean isFinished = false ; private boolean isTriggered = true ; protected int milliseconds = 0 ; protected int seconds = 0 ; protected int minutes = 0 ; private Handler handler = new Handler ( ) ; protected int roundMaxMinutes = Integer . MAX_VALUE ; protected int roundMaxSeconds = Integer . MAX_VALUE ; TextView textView ; Thread thread ; public Timer ( int maxRoundSeconds , int maxRoundMinutes , final TextView textView ) { } public int getMilliseconds ( ) { } public int getSeconds ( ) { } public int getMinutes ( ) { } public boolean getIsRunning ( ) { } public void setMilliseconds ( int amountInMilliseconds ) { } public void setSeconds ( int amountInSeconds ) { } public void setMinutes ( int amountInMinutes ) { } public void setIsRunning ( boolean running ) { } @ Override public void start ( ) { isRunning = true ; if ( isTriggered ) { isTriggered = false ; Runnable runnable = new Runnable ( ) { @ Override public void run ( ) { while ( isRunning ) { try { Thread . sleep ( 100 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } handler . post ( new Runnable ( ) { @ Override public void run ( ) { milliseconds += 10 ; if ( ( milliseconds ) >= 100 ) { milliseconds = 0 ; ( seconds ) ++ ; textView . setText ( printResult ( ) ) ; <START_BUG> if ( ( seconds ) == 60 ) { <END_BUG> seconds = 0 ; ( minutes ) ++ ; } } checkIsFinished ( ) ; } } ) ; } } } ; thread = new Thread ( runnable ) ; thread . start ( ) ; } } @ Override public void pause ( ) { } @ Override public void stop ( ) { } public String printResult ( ) { } private void resetTimer ( ) { } private void checkIsFinished ( ) { } }

Fix:
if ( ( seconds ) == 59 ) {
Buggy code:
public class DistributedTestActivator extends TestActivator implements ServiceListener { private BundleContext context ; public void start ( BundleContext aContext ) throws Exception { } public void stop ( BundleContext context ) throws Exception { } public void serviceChanged ( ServiceEvent event ) { if ( ( context ) == null ) { return ; } switch ( event . getType ( ) ) { case ServiceEvent . REGISTERED : ServiceReference serviceReference = event . getServiceReference ( ) ; handleServiceAdded ( serviceReference ) ; break ; } if ( ( ( advertiser ) != null ) && ( ( locator ) != null ) ) { new Thread ( new Runnable ( ) { public void run ( ) { startTests ( ) ; } <START_BUG> } ) ; <END_BUG> } } private void handleServiceAdded ( final ServiceReference aServiceReference ) { } }

Fix:
} ) . start ( ) ;
Buggy code:
public class ActivityAttributeNameRule extends BaseRule { public ActivityAttributeNameRule ( Digester digester , String state ) { } public void body ( String text ) throws Exception { Category cat = Category . getInstance ( DBImport . class ) ; cat . debug ( ( ( ( "(" + ( state ) ) + ")<seq2seq4repair_space>activity<seq2seq4repair_space>attribute<seq2seq4repair_space>name<seq2seq4repair_space>body:<seq2seq4repair_space>" ) + text ) ) ; <START_BUG> super . body ( text ) ; <END_BUG> } }

Fix:
super . digesterPush ( text ) ;
Buggy code:
public class TestFailOnFieldCacheInsanity extends WithNestedTests { public TestFailOnFieldCacheInsanity ( ) { } public static class Nested1 extends WithNestedTests . AbstractNestedTest { private Directory d ; private IndexReader r ; private AtomicReader subR ; private void makeIndex ( ) throws Exception { } public void testDummy ( ) throws Exception { makeIndex ( ) ; assertNotNull ( DEFAULT . getTermsIndex ( subR , "ints" ) ) ; <START_BUG> assertNotNull ( DEFAULT . getTerms ( subR , "ints" ) ) ; <END_BUG> } } @ Test public void testFailOnFieldCacheInsanity ( ) { } }

Fix:
assertNotNull ( DEFAULT . getTerms ( subR , "ints" , false ) ) ;
Buggy code:
public abstract class WebApplication extends Application { private static final long serialVersionUID = 1152456333052646498L ; private WicketServlet wicketServlet ; public WebApplication ( ) { } public ISessionFactory getSessionFactory ( ) { return new ISessionFactory ( ) { public Session newSession ( ) { <START_BUG> return new HttpSession ( WebApplication . this ) ; <END_BUG> } } ; } public void init ( ) { } public WicketServlet getWicketServlet ( ) { } public void setWicketServlet ( WicketServlet wicketServlet ) { } }

Fix:
return new WebSession ( WebApplication . this ) ;
Buggy code:
public class HintedHandOffManager { public static final HintedHandOffManager instance = new HintedHandOffManager ( ) ; private static final Logger logger_ = LoggerFactory . getLogger ( HintedHandOffManager . class ) ; static final long INTERVAL_IN_MS = 3600 * 1000 ; public static final String HINTS_CF = "HintsColumnFamily" ; private static final int PAGE_SIZE = 10000 ; private final ExecutorService executor_ = new JMXEnabledThreadPoolExecutor ( "HINTED-HANDOFF-POOL" ) ; protected HintedHandOffManager ( ) { } private static boolean sendMessage ( InetAddress endpoint , String tableName , byte [ ] key ) throws IOException { if ( ! ( Gossiper . instance . isKnownEndpoint ( endpoint ) ) ) { HintedHandOffManager . logger_ . warn ( ( ( "Hints<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>endpoint<seq2seq4repair_space>" + endpoint ) + "<seq2seq4repair_space>which<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>part<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>gossip<seq2seq4repair_space>network.<seq2seq4repair_space>discarding." ) ) ; return true ; } if ( ! ( FailureDetector . instance . isAlive ( endpoint ) ) ) { return false ; } Table table = Table . open ( tableName ) ; RowMutation rm = new RowMutation ( tableName , key ) ; DecoratedKey dkey = StorageService . getPartitioner ( ) . decorateKey ( key ) ; for ( ColumnFamilyStore cfstore : table . getColumnFamilyStores ( ) ) { ColumnFamily cf = cfstore . getColumnFamily ( QueryFilter . getIdentityFilter ( dkey , new org . apache . cassandra . db . filter . QueryPath ( cfstore . getColumnFamilyName ( ) ) ) ) ; if ( cf != null ) rm . add ( cf ) ; } Message message = rm . makeRowMutationMessage ( ) ; <START_BUG> WriteResponseHandler responseHandler = new WriteResponseHandler ( 1 , tableName ) ; <END_BUG> MessagingService . instance . sendRR ( message , new InetAddress [ ] { endpoint } , responseHandler ) ; try { responseHandler . get ( ) ; } catch ( TimeoutException e ) { return false ; } return true ; } private static void deleteEndpoint ( byte [ ] endpointAddress , String tableName , byte [ ] key , long timestamp ) throws IOException { } private static void deleteHintKey ( String tableName , byte [ ] key ) throws IOException { } private static void deliverAllHints ( ) throws IOException , TimeoutException , DigestMismatchException , InvalidRequestException { } private static boolean pagingFinished ( ColumnFamily hintColumnFamily , byte [ ] startColumn ) { } private static void deliverHintsToEndpoint ( InetAddress endpoint ) throws IOException , TimeoutException , DigestMismatchException , InvalidRequestException { } public static void renameHints ( String oldTable , String newTable ) throws IOException { } public void deliverHints ( final InetAddress to ) { } }

Fix:
WriteResponseHandler responseHandler = new WriteResponseHandler ( endpoint ) ;