nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DDCreator extends MatchingTask { private String classpath ; private File descriptorDirectory ; private File generatedFilesDirectory ; public void setClasspath ( String s ) { } public void setDescriptors ( String dirName ) { } public void setDest ( String dirName ) { } public void execute ( ) throws TaskException { if ( ( ( descriptorDirectory ) == null ) || ( ! ( descriptorDirectory . isDirectory ( ) ) ) ) { throw new TaskException ( ( ( "descriptors<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( descriptorDirectory . getPath ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ) ; } if ( ( ( generatedFilesDirectory ) == null ) || ( ! ( generatedFilesDirectory . isDirectory ( ) ) ) ) { throw new TaskException ( ( ( "dest<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( generatedFilesDirectory . getPath ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ) ; } String args = ( ( descriptorDirectory ) + "<seq2seq4repair_space>" ) + ( generatedFilesDirectory ) ; DirectoryScanner ds = super . getDirectoryScanner ( descriptorDirectory ) ; String [ ] files = ds . getIncludedFiles ( ) ; for ( int i = 0 ; i < ( files . length ) ; ++ i ) { args += "<seq2seq4repair_space>" + ( files [ i ] ) ; } String systemClassPath = System . getProperty ( "java.class.path" ) ; String execClassPath = getProject ( ) . translatePath ( ( ( systemClassPath + ":" ) + ( classpath ) ) ) ; Java ddCreatorTask = ( ( Java ) ( getProject ( ) . createTask ( "java" ) ) ) ; ddCreatorTask . setFork ( true ) ; ddCreatorTask . setClassname ( "org.apache.tools.ant.taskdefs.optional.ejb.DDCreatorHelper" ) ; Argument arguments = ddCreatorTask . createArg ( ) ; arguments . setLine ( args ) ; <START_BUG> ddCreatorTask . setClasspath ( new org . apache . tools . ant . types . Path ( getProject ( ) , execClassPath ) ) ; <END_BUG> if ( ( ddCreatorTask . executeJava ( ) ) != 0 ) { throw new TaskException ( "Execution<seq2seq4repair_space>of<seq2seq4repair_space>ddcreator<seq2seq4repair_space>helper<seq2seq4repair_space>failed" ) ; } } }

Fix:
ddCreatorTask . setClasspath ( new Path ( execClassPath ) ) ;
Buggy code:
public class SuperReference extends ThisReference { public static final SuperReference Super = new SuperReference ( ) ; public SuperReference ( ) { } public SuperReference ( int pos , int sourceEnd ) { } public static ExplicitConstructorCall implicitSuperConstructorCall ( ) { } public boolean isSuper ( ) { } public boolean isThis ( ) { } public TypeBinding resolveType ( BlockScope scope ) { constant = NotAConstant ; if ( ! ( checkAccess ( scope . methodScope ( ) ) ) ) return null ; SourceTypeBinding enclosingTb = scope . enclosingSourceType ( ) ; if ( scope . isJavaLangObject ( enclosingTb ) ) { scope . problemReporter ( ) . cannotUseSuperInJavaLangObject ( this ) ; return null ; } <START_BUG> return this . expressionType = enclosingTb . superclass ; <END_BUG> } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } }

Fix:
return this . resolvedType = enclosingTb . superclass ;
Buggy code:
public class OgpFileUtils { private static final int TEMP_DIR_ATTEMPTS = 10000 ; static final Logger logger = LoggerFactory . getLogger ( OgpFileUtils . class . getName ( ) ) ; public static String filterName ( String layerName ) { } public static File createNewFileFromDownload ( String fileName , String mimeType , File directory ) throws IOException { } public static String getFileExtensionFromMimeType ( String contentType ) { String responseContentType = contentType . toLowerCase ( ) ; OgpFileUtils . logger . info ( ( "response<seq2seq4repair_space>MIME-Type:<seq2seq4repair_space>" + responseContentType ) ) ; if ( ( responseContentType . indexOf ( ";" ) ) > ( - 1 ) ) { responseContentType = responseContentType . substring ( 0 , responseContentType . indexOf ( ";" ) ) ; } String fileExtension ; if ( ( responseContentType . contains ( "text//xml" ) ) || ( responseContentType . contains ( "application//xml" ) ) ) { fileExtension = ".xml" ; } else if ( ( responseContentType . contains ( "text//html" ) ) || ( responseContentType . contains ( "application//html" ) ) ) { fileExtension = ".html" ; } else <START_BUG> if ( responseContentType . contains ( "application//zip" ) ) { <END_BUG> fileExtension = ".zip" ; } else if ( ( responseContentType . contains ( "tiff" ) ) || ( responseContentType . contains ( "geotiff" ) ) ) { fileExtension = ".tif" ; } else if ( responseContentType . contains ( "image//jpeg" ) ) { fileExtension = ".jpg" ; } else if ( responseContentType . contains ( "application//vnd.google-earth.kmz" ) ) { fileExtension = ".kmz" ; } else if ( responseContentType . contains ( "application//vnd.ogc.se_xml" ) ) { fileExtension = "_error.xml" ; } else { fileExtension = ".unk" ; } return fileExtension ; } public static File createTempDir ( ) { } }

Fix:
if ( ( responseContentType . contains ( "application" ) ) && ( responseContentType . contains ( "zip" ) ) ) {
Buggy code:
@ ContentView ( layout . activity_login ) public class LoginActivity extends BaseActivity implements LoginPresenter . LoginView { @ InjectView ( id . tx_username ) public EditText userName ; @ InjectView ( id . tx_password ) public EditText password ; @ InjectView ( id . btn_login ) public Button btnLogin ; @ InjectView ( id . ly_username ) public TextInputLayout lyUserName ; @ InjectView ( id . ly_password ) public TextInputLayout lyPassword ; @ Inject LoginPresenter presenter ; public static boolean isActive ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } void initUI ( ) { } @ Override public Presenter getPresenter ( ) { } public void goToInitInventory ( ) { } public void goToHomePage ( ) { } public void startActivity ( Class activityName ) { } public void clearPassword ( ) { } public void clearErrorAlerts ( ) { } @ Override public boolean needInitInventory ( ) { } @ Override public boolean isConnectionAvailable ( ) { } @ Override public boolean hasGetProducts ( ) { } @ Override public void setHasGetProducts ( boolean hasGetProducts ) { } @ Override public void showInvalidAlert ( ) { } @ Override public void showPasswordEmpty ( ) { } @ Override public void showUserNameEmpty ( ) { } @ Override protected void onStart ( ) { } @ Override protected void onStop ( ) { } public static Intent getIntentToMe ( Context context ) { Intent intent = new Intent ( context , LoginActivity . class ) ; <START_BUG> intent . setFlags ( ( ( Intent . FLAG_ACTIVITY_NEW_TASK ) | ( Intent . FLAG_ACTIVITY_CLEAR_TOP ) ) ) ; <END_BUG> return intent ; } @ Override public boolean onKeyDown ( int keyCode , KeyEvent event ) { } }

Fix:
intent . setFlags ( FLAG_ACTIVITY_CLEAR_TASK ) ;
Buggy code:
public class ResolvedPointcutDefinition extends ResolvedMember { private Pointcut pointcut ; public ResolvedPointcutDefinition ( TypeX declaringType , int modifiers , String name , TypeX [ ] parameterTypes , Pointcut pointcut ) { } public void write ( DataOutputStream s ) throws IOException { getDeclaringType ( ) . write ( s ) ; s . writeInt ( getModifiers ( ) ) ; s . writeUTF ( getName ( ) ) ; <START_BUG> TypeX . write ( getParameterTypes ( ) , s ) ; <END_BUG> pointcut . write ( s ) ; } public static ResolvedPointcutDefinition read ( DataInputStream s , ISourceContext context ) throws IOException { } public String toString ( ) { } public Pointcut getPointcut ( ) { } public boolean isAjSynthetic ( ) { } public static final ResolvedPointcutDefinition DUMMY = new ResolvedPointcutDefinition ( TypeX . OBJECT , 0 , "missing" , TypeX . NONE , Pointcut . makeMatchesNothing ( RESOLVED ) ) ; }

Fix:
TypeX . writeArray ( getParameterTypes ( ) , s ) ;
Buggy code:
public class TestOcr { public static void main ( String [ ] args ) throws Exception { <START_BUG> File f = new File ( "//home//pasquale//ProgettoSicurezza//crop3//img_text.png" ) ; <END_BUG> BufferedImage img = ImageIO . read ( f ) ; img = ImageHelper . convertImageToBinary ( img ) ; Tesseract ts = Tesseract . getInstance ( ) ; ts . setPageSegMode ( PSM_SINGLE_BLOCK ) ; ImageDeskew deskew = new ImageDeskew ( img ) ; double angle = deskew . getSkewAngle ( ) ; System . out . println ( ( "Angle<seq2seq4repair_space>before<seq2seq4repair_space>rotation:" + angle ) ) ; if ( ( Math . abs ( angle ) ) > 5 ) { img = ImageHelper . rotateImage ( img , ( - angle ) ) ; deskew = new ImageDeskew ( img ) ; angle = deskew . getSkewAngle ( ) ; System . out . println ( ( "Angle<seq2seq4repair_space>after<seq2seq4repair_space>rotation<seq2seq4repair_space>(if<seq2seq4repair_space>needed):" + angle ) ) ; } String result = ts . doOCR ( img ) ; System . out . println ( ( ( "Risultato:\n===\n" + result ) + "\n====\n" ) ) ; } }

Fix:
File f = new File ( "//home//pasquale//ProgettoSicurezza//pasquale//output//img_text.png" ) ;
Buggy code:
public class WordCount extends Configured implements Tool { private static final Logger logger = Logger . getLogger ( WordCount . class ) ; static final String KEYSPACE = "Keyspace1" ; static final String COLUMN_FAMILY = "Standard1" ; private static final String CONF_COLUMN_NAME = "columnname" ; private static final String OUTPUT_PATH_PREFIX = "//tmp//word_count" ; static final int RING_DELAY = 3000 ; public static void main ( String [ ] args ) throws Exception { } public static class TokenizerMapper extends Mapper < String , SortedMap < byte [ ] , IColumn > , Text , IntWritable > { private static final IntWritable one = new IntWritable ( 1 ) ; private Text word = new Text ( ) ; private String columnName ; public void map ( String key , SortedMap < byte [ ] , IColumn > columns , Context context ) throws IOException , InterruptedException { } protected void setup ( Mapper . Context context ) throws IOException , InterruptedException { } } public static class IntSumReducer extends Reducer < Text , IntWritable , Text , IntWritable > { private IntWritable result = new IntWritable ( ) ; public void reduce ( Text key , Iterable < IntWritable > values , Context context ) throws IOException , InterruptedException { } } public int run ( String [ ] args ) throws Exception { Configuration conf = getConf ( ) ; for ( int i = 0 ; i < ( WordCountSetup . TEST_COUNT ) ; i ++ ) { String columnName = "text" + i ; conf . set ( WordCount . CONF_COLUMN_NAME , columnName ) ; Job job = new Job ( conf , "wordcount" ) ; job . setJarByClass ( WordCount . class ) ; job . setMapperClass ( WordCount . TokenizerMapper . class ) ; job . setCombinerClass ( WordCount . IntSumReducer . class ) ; job . setReducerClass ( WordCount . IntSumReducer . class ) ; job . setOutputKeyClass ( Text . class ) ; job . setOutputValueClass ( IntWritable . class ) ; job . setInputFormatClass ( ColumnFamilyInputFormat . class ) ; FileOutputFormat . setOutputPath ( job , new Path ( ( ( WordCount . OUTPUT_PATH_PREFIX ) + i ) ) ) ; ConfigHelper . setThriftContact ( conf , "localhost" , 9160 ) ; <START_BUG> ConfigHelper . setColumnFamily ( job . getConfiguration ( ) , WordCount . KEYSPACE , WordCount . COLUMN_FAMILY , "BytesType" , "RandomPartitioner" ) ; <END_BUG> SlicePredicate predicate = new SlicePredicate ( ) . setColumn_names ( Arrays . asList ( columnName . getBytes ( ) ) ) ; ConfigHelper . setSlicePredicate ( job . getConfiguration ( ) , predicate ) ; job . waitForCompletion ( true ) ; } return 0 ; } }

Fix:
ConfigHelper . setColumnFamily ( job . getConfiguration ( ) , WordCount . KEYSPACE , WordCount . COLUMN_FAMILY ) ;
Buggy code:
public class UpdateMapPacket extends TCP_Packet { private static final int dimensionPlayer = 32 ; private static final int dimensionEntity = 4 ; Collection < Entity > entities ; Collection < Player > players ; public UpdateMapPacket ( Collection < Entity > entitys , Collection < Player > players ) { } public UpdateMapPacket ( ByteBuffer buffer ) { } @ Override public void createBuffer ( ) { log . debug ( "Writing<seq2seq4repair_space>UpdateMap" ) ; int dimension = 1 ; dimension += 2 ; for ( Player p : players ) { dimension += UpdateMapPacket . dimensionPlayer ; dimension += 2 ; dimension += ( UpdateMapPacket . dimensionEntity ) * ( p . getEntities ( ) . size ( ) ) ; } buffer = ByteBuffer . allocate ( dimension ) ; buffer . clear ( ) ; <START_BUG> buffer . put ( ( ( byte ) ( - 125 ) ) ) ; <END_BUG> buffer . putChar ( ( ( char ) ( players . size ( ) ) ) ) ; log . debug ( ( ( ( "number<seq2seq4repair_space>player:<seq2seq4repair_space>" + ( players . size ( ) ) ) + "<seq2seq4repair_space>" ) + ( ( char ) ( players . size ( ) ) ) ) ) ; for ( Player p : players ) { buffer . putChar ( ( ( char ) ( p . getEntities ( ) . size ( ) ) ) ) ; log . debug ( ( ( ( "number<seq2seq4repair_space>entities:<seq2seq4repair_space>" + ( p . getEntities ( ) . size ( ) ) ) + "<seq2seq4repair_space>" ) + ( ( ( char ) ( p . getEntities ( ) . size ( ) ) ) & 255 ) ) ) ; buffer . putChar ( p . playerID ) ; byte [ ] array ; try { array = p . getPlayerName ( ) . getBytes ( "ASCII" ) ; int i = 0 ; for ( ; i < ( array . length ) ; i ++ ) buffer . put ( array [ i ] ) ; for ( ; i < 30 ; i ++ ) { buffer . put ( ( ( byte ) ( 32 ) ) ) ; } for ( Entity e : p . getEntities ( ) ) { buffer . putChar ( e . entityID ) ; buffer . putChar ( e . blueprintID ) ; } } catch ( UnsupportedEncodingException e1 ) { log . error ( "Impossibile<seq2seq4repair_space>castare<seq2seq4repair_space>a<seq2seq4repair_space>char:<seq2seq4repair_space>" , e1 ) ; e1 . printStackTrace ( ) ; } } buffer . flip ( ) ; log . debug ( ( "out<seq2seq4repair_space>buffer:<seq2seq4repair_space>" + ( buffer ) ) ) ; } @ Override protected boolean recognizePacket ( ) { } protected boolean mapPacket ( ) { } private Player recognizePlayer ( ByteBuffer buffer ) { } private String getPlayerName ( ) { } private Entity recognizeEntity ( ByteBuffer buffer , Player possessor ) { } @ Override public String toString ( ) { } }

Fix:
buffer . put ( ( ( byte ) ( 3 ) ) ) ;
Buggy code:
public class ProjectProxy { private AppContext _context = null ; private File _file = null ; private ACSProjectElement _project = null ; private Thread _buildThread = null ; private ElementSelectionModel _selections = null ; public ProjectProxy ( AppContext context , File file ) throws IOException , SAXException { } private void loadProject ( ) throws IOException , SAXException { } public void write ( Writer out ) throws IOException { } public void build ( ) throws BuildException { } public File getFile ( ) { } public void setFile ( File file ) { } public TreeModel getTreeModel ( ) { } public ElementSelectionModel getTreeSelectionModel ( ) { } public Document getDocument ( ) { } private class BuildRunner implements Runnable { private Project _project = null ; public BuildRunner ( Project project ) { } private void fireBuildEvent ( BuildEvent event , BuildEventType type ) { } public void run ( ) { } } private class SelectionForwarder implements TreeSelectionListener { public void valueChanged ( TreeSelectionEvent e ) { <START_BUG> _context . getEventBus ( ) . postEvent ( new ElementSelectionEvent ( _context , _selections . getSelectedElements ( ) ) ) ; <END_BUG> } } }

Fix:
_context . getEventBus ( ) . postEvent ( ElementSelectionEvent . createEvent ( _context , _selections . getSelectedElements ( ) ) ) ;
Buggy code:
final class CSVLexer extends Lexer { public CSVLexer ( final CSVFormat format , final ExtendedBufferedReader in ) { } @ Override Token nextToken ( final Token token ) throws IOException { <START_BUG> int lastChar = in . readAgain ( ) ; <END_BUG> int c = in . read ( ) ; boolean eol = isEndOfLine ( c ) ; if ( ignoreEmptyLines ) { while ( eol && ( isStartOfLine ( lastChar ) ) ) { lastChar = c ; c = in . read ( ) ; eol = isEndOfLine ( c ) ; if ( isEndOfFile ( c ) ) { token . type = Type . EOF ; return token ; } } } if ( ( isEndOfFile ( lastChar ) ) || ( ( ! ( isDelimiter ( lastChar ) ) ) && ( isEndOfFile ( c ) ) ) ) { token . type = Type . EOF ; return token ; } if ( ( isStartOfLine ( lastChar ) ) && ( isCommentStart ( c ) ) ) { final String comment = in . readLine ( ) . trim ( ) ; token . content . append ( comment ) ; token . type = Type . COMMENT ; return token ; } while ( ( token . type ) == ( Type . INVALID ) ) { if ( ignoreSurroundingSpaces ) { while ( ( isWhitespace ( c ) ) && ( ! eol ) ) { c = in . read ( ) ; eol = isEndOfLine ( c ) ; } } if ( isDelimiter ( c ) ) { token . type = Type . TOKEN ; } else if ( eol ) { token . type = Type . EORECORD ; } else if ( isEncapsulator ( c ) ) { encapsulatedTokenLexer ( token ) ; } else if ( isEndOfFile ( c ) ) { token . type = Type . EOF ; token . isReady = true ; } else { simpleTokenLexer ( token , c ) ; } } return token ; } private Token simpleTokenLexer ( final Token tkn , int c ) throws IOException { } private Token encapsulatedTokenLexer ( final Token tkn ) throws IOException { } }

Fix:
int lastChar = in . getLastChar ( ) ;
Buggy code:
public class InstagramItem extends BaseItem { private static final InstagramItem mInstance = new InstagramItem ( ) ; public InstagramItem fromJSON ( JSONObject jPhoto ) throws JSONException { InstagramItem item = new InstagramItem ( ) ; JSONObject jLocation = jPhoto . getJSONObject ( "location" ) ; item . position = new com . google . android . gms . maps . model . LatLng ( jLocation . getDouble ( "latitude" ) , jLocation . getDouble ( "longitude" ) ) ; item . title = ( jLocation . isNull ( "name" ) ) ? "Image" : jLocation . getString ( "name" ) ; item . externalURL = ( jPhoto . isNull ( "link" ) ) ? null : jPhoto . getString ( "link" ) ; item . desc = ( jPhoto . isNull ( "caption" ) ) ? "" : jPhoto . getJSONObject ( "caption" ) . getString ( "text" ) ; JSONObject images = jPhoto . getJSONObject ( "images" ) ; item . imageIconURL = images . getJSONObject ( "thumbnail" ) . getString ( "url" ) ; <START_BUG> item . highResImageURL = images . getJSONObject ( "standard_resolution" ) . getString ( "url" ) ; <END_BUG> return item ; } public static BaseItem getInstance ( ) { } }

Fix:
item . highResImageURL = images . getJSONObject ( "low_resolution" ) . getString ( "url" ) ;
Buggy code:
public class ConfusionMatrix { public static Random rd = new Random ( System . currentTimeMillis ( ) ) ; enum EvaluatorMethod { MEAN , MAX , MIN , DEFAULT , MEDIAN ; } private static Logger log = LoggerFactory . getLogger ( ConfusionMatrix . class ) ; private ModelConfig modelConfig ; private EvalConfig evalConfig ; private int targetColumnIndex = - 1 ; private int scoreColumnIndex = - 1 ; private int weightColumnIndex = - 1 ; public ConfusionMatrix ( ModelConfig modelConfig , EvalConfig evalConfig ) throws IOException { } private String [ ] getEvalScoreHeader ( ) throws IOException { PathFinder pathFinder = new PathFinder ( modelConfig ) ; SourceType sourceType = evalConfig . getDataSet ( ) . getSource ( ) ; String pathHeader = null ; boolean isDir = ShifuFileUtils . isDir ( pathFinder . getEvalScorePath ( evalConfig , sourceType ) , sourceType ) ; if ( isDir ) { pathHeader = pathFinder . getEvalScoreHeaderPath ( evalConfig , sourceType ) ; } else { pathHeader = pathFinder . getEvalScorePath ( evalConfig , sourceType ) ; } <START_BUG> return CommonUtils . getHeaders ( pathHeader , "|" , sourceType ) ; <END_BUG> } public void bufferedComputeConfusionMatrixAndPerformance ( long pigPosTags , long pigNegTags , double pigPosWeightTags , double pigNegWeightTags , long records ) throws IOException { } public void bufferedComputeConfusionMatrix ( long pigPosTags , long pigNegTags , double pigPosWeightTags , double pigNegWeightTags ) throws IOException { } public void computeConfusionMatrix ( ) throws IOException { } }

Fix:
return CommonUtils . getHeaders ( pathHeader , "|" , sourceType , false ) ;
Buggy code:
public class TransformedList < E > extends TransformedCollection < E > implements List < E > { private static final long serialVersionUID = 1077193035000013141L ; public static < E > TransformedList < E > transformingList ( final List < E > list , final Transformer < ? super E , ? extends E > transformer ) { } public static < E > TransformedList < E > transformedList ( final List < E > list , final Transformer < ? super E , ? extends E > transformer ) { } protected TransformedList ( final List < E > list , final Transformer < ? super E , ? extends E > transformer ) { } protected List < E > getList ( ) { <START_BUG> return ( ( List < E > ) ( collection ) ) ; <END_BUG> } public E get ( final int index ) { } public int indexOf ( final Object object ) { } public int lastIndexOf ( final Object object ) { } public E remove ( final int index ) { } public void add ( final int index , E object ) { } public boolean addAll ( final int index , Collection < ? extends E > coll ) { } public ListIterator < E > listIterator ( ) { } public ListIterator < E > listIterator ( final int i ) { } public E set ( final int index , E object ) { } public List < E > subList ( final int fromIndex , final int toIndex ) { } protected class TransformedListIterator extends AbstractListIteratorDecorator < E > { protected TransformedListIterator ( final ListIterator < E > iterator ) { } @ Override public void add ( E object ) { } @ Override public void set ( E object ) { } } }

Fix:
return ( ( List < E > ) ( TransformedList . decorated ( ) ) ) ;
Buggy code:
public class AddCommand implements ICommand { private static final String DEADLINED_TASKNAME = "deadlined" ; private static final String TIMED_TASKNAME = "timed" ; private static final String FLOATING_TASKNAME = "floating" ; private String _taskName ; private LocalDate _startDate ; private LocalTime _startTime ; private LocalDate _endDate ; private LocalTime _endTime ; private CommandType _commandType = CommandType . ADD ; public AddCommand ( ) { } public String getTaskName ( ) { } public void setTaskName ( String _taskName ) { } public LocalDate getStartDate ( ) { } public void setStartDate ( LocalDate _startDate ) { } public LocalTime getStartTime ( ) { } public void setStartTime ( LocalTime _startTime ) { } public LocalDate getEndDate ( ) { } public void setEndDate ( LocalDate _endDate ) { } public LocalTime getEndTime ( ) { } public void setEndTime ( LocalTime _endTime ) { } public LocalDateTime getStartDateTime ( ) { } public LocalDateTime getEndDateTime ( ) { } public CommandType getCommandType ( ) { } @ Override public void execute ( ) { } private String formatAddMsg ( Task task ) { String taskType = Controller . determineTaskType ( task ) ; if ( taskType . equalsIgnoreCase ( AddCommand . FLOATING_TASKNAME ) ) { return String . format ( ADD_FLOATING , task . getTitle ( ) ) ; } if ( taskType . equalsIgnoreCase ( AddCommand . DEADLINED_TASKNAME ) ) { <START_BUG> return String . format ( ADD_DEADLINED , task . getTitle ( ) , task . getStartDateTime ( ) . format ( DateTimeFormatter . ISO_LOCAL_DATE_TIME ) ) ; <END_BUG> } else { return String . format ( ADD_TIMED , task . getTitle ( ) , task . getStartDateTime ( ) . format ( DateTimeFormatter . ISO_LOCAL_DATE_TIME ) , task . getEndDateTime ( ) . format ( DateTimeFormatter . ISO_LOCAL_DATE_TIME ) ) ; } } private Task determineTaskTypeAndAdd ( ) { } }

Fix:
return String . format ( ADD_DEADLINED , task . getTitle ( ) , task . getEndDateTime ( ) . format ( DateTimeFormatter . ISO_LOCAL_DATE_TIME ) ) ;
Buggy code:
public final class AboutSystemDialog extends ProductInfoDialog { private Text text ; private static final int BROWSE_ERROR_LOG_BUTTON = IDialogConstants . CLIENT_ID ; private static final int COPY_TO_CLIPBOARD_BUTTON = ( IDialogConstants . CLIENT_ID ) + 1 ; private static final String ERROR_LOG_COPY_FILENAME = "log" ; public AboutSystemDialog ( Shell parentShell ) { } protected void configureShell ( Shell newShell ) { } protected void createButtonsForButtonBar ( Composite parent ) { } protected Control createDialogArea ( Composite parent ) { } private String getSystemSummary ( ) { } private void appendExtensions ( PrintWriter writer ) { } private IConfigurationElement [ ] getSortedExtensions ( ) { } protected void buttonPressed ( int buttonId ) { } private void openErrorLogBrowser ( ) { } private File makeDisplayCopy ( File file ) { IPath path = WorkbenchPlugin . getDefault ( ) . getDataLocation ( ) ; if ( path == null ) return null ; path = path . append ( AboutSystemDialog . ERROR_LOG_COPY_FILENAME ) ; File copy = path . toFile ( ) ; FileReader in = null ; FileWriter out = null ; try { in = new FileReader ( file ) ; <START_BUG> out = new FileWriter ( copy , false ) ; <END_BUG> char [ ] buffer = new char [ 4096 ] ; int count ; while ( ( count = in . read ( buffer , 0 , buffer . length ) ) > 0 ) { out . write ( buffer , 0 , count ) ; } } catch ( FileNotFoundException e ) { return null ; } catch ( IOException e ) { return null ; } finally { try { if ( in != null ) in . close ( ) ; if ( out != null ) out . close ( ) ; } catch ( IOException e ) { return null ; } } return copy ; } private void runCopyToClipboard ( ) { } }

Fix:
out = new FileWriter ( copy ) ;
Buggy code:
public class InfinispanSSOManagerFactoryBuilder implements SSOManagerFactoryBuilder { @ Override public ServiceBuilder < SSOManagerFactory > build ( ServiceTarget target , ServiceName name , SSOManagerConfiguration config ) { @ SuppressWarnings ( "rawtypes" ) <START_BUG> InjectedValue < Cache > cache = new InjectedValue < Cache > ( ) ; <END_BUG> return target . addService ( name , new InfinispanSSOManagerFactory ( cache ) ) . addDependency ( CacheService . getServiceName ( config . getContainer ( ) , config . getCache ( ) ) , Cache . class , cache ) ; } }

Fix:
InjectedValue < Cache > cache = new InjectedValue ( ) ;
Buggy code:
public class RefinedStorageUtils { public static final String NBT_INVENTORY = "Inventory_%d" ; public static final String NBT_SLOT = "Slot" ; public static final int COMPARE_DAMAGE = 1 ; public static final int COMPARE_NBT = 2 ; public static final int COMPARE_QUANTITY = 4 ; public static void saveInventory ( IInventory inventory , int id , NBTTagCompound nbt ) { } public static void restoreInventory ( IInventory inventory , int id , NBTTagCompound nbt ) { } public static void dropInventory ( World world , IInventory inventory , int x , int y , int z ) { } public static void dropStack ( World world , ItemStack stack , int x , int y , int z ) { } public static void pushToInventory ( IInventory inventory , ItemStack stack ) { } public static boolean canPushToInventory ( IInventory inventory , ItemStack stack ) { } public static int getInventoryItemCount ( IInventory inventory ) { } public static boolean compareStack ( ItemStack first , ItemStack second ) { } public static boolean compareStack ( ItemStack first , ItemStack second , int flags ) { } public static boolean compareStackNoQuantity ( ItemStack first , ItemStack second ) { } public static int getSpeed ( InventorySimple inventory ) { } public static int getSpeed ( InventorySimple inventory , int start ) { } public static int getSpeed ( InventorySimple inventory , int speed , int speedIncrease ) { } public static int getSpeed ( InventorySimple inventory , int speed , int speedIncrease , int start ) { } public static boolean hasUpgrade ( InventorySimple inventory , int type ) { } public static int getUpgradeCount ( InventorySimple inventory , int type ) { } public static int getUpgradeCount ( InventorySimple inventory , int type , int start ) { } public static void writeBooleanArray ( NBTTagCompound tag , String name , boolean [ ] array ) { } public static boolean [ ] readBooleanArray ( NBTTagCompound tag , String name ) { } public static EnumHand getHandById ( int id ) { } public static int getIdFromHand ( EnumHand hand ) { } public static void sendToAllAround ( World world , BlockPos pos , IMessage message ) { } public static void reRenderBlock ( World world , BlockPos pos ) { <START_BUG> world . notifyBlockUpdate ( pos , world . getBlockState ( pos ) , world . getBlockState ( pos ) , 8 ) ; <END_BUG> } }

Fix:
world . notifyBlockUpdate ( pos , world . getBlockState ( pos ) , world . getBlockState ( pos ) , ( 1 | 2 ) ) ;
Buggy code:
public class CarList extends ArrayList < Car > { public void loadFromJSON ( final String path ) throws IOException { } class PriceComparator implements Comparator < Car > { @ Override public int compare ( Car car1 , Car car2 ) { <START_BUG> double comp = ( car1 . getPrice ( ) ) - ( car2 . getPrice ( ) ) ; <END_BUG> if ( comp < 0 ) return - 1 ; if ( comp > 0 ) return 1 ; return 0 ; } } public void sortByPrice ( ) { } }

Fix:
double comp = ( car1 . PRICE ) - ( car2 . PRICE ) ;
Buggy code:
public class Msg { public Msg ( ) { } public static void puts ( String msg ) { <START_BUG> System . out . println ( ( msg + "\n" ) ) ; <END_BUG> } public static void puts ( char c ) { } public static void putsLine ( ) { } }

Fix:
System . out . println ( msg ) ;
Buggy code:
public class MillerUpdatingRegression implements UpdatingMultipleLinearRegression { private final int nvars ; private final double [ ] d ; private final double [ ] rhs ; private final double [ ] r ; private final double [ ] tol ; private final double [ ] rss ; private final int [ ] vorder ; private final double [ ] work_tolset ; private long nobs = 0 ; private double sserr = 0.0 ; private boolean rss_set = false ; private boolean tol_set = false ; private final boolean [ ] lindep ; private final double [ ] x_sing ; private final double [ ] work_sing ; private double sumy = 0.0 ; private double sumsqy = 0.0 ; private boolean hasIntercept ; private final double epsilon ; @ SuppressWarnings ( "unused" ) private MillerUpdatingRegression ( ) { } public MillerUpdatingRegression ( int numberOfVariables , boolean includeConstant , double errorTolerance ) { } public MillerUpdatingRegression ( int numberOfVariables , boolean includeConstant ) { } public boolean hasIntercept ( ) { } public long getN ( ) { } public void addObservation ( final double [ ] x , final double y ) { if ( ( ( ! ( this . hasIntercept ) ) && ( ( x . length ) != ( nvars ) ) ) || ( ( this . hasIntercept ) && ( ( ( x . length ) + 1 ) != ( nvars ) ) ) ) { throw new IllegalArgumentException ( "Length<seq2seq4repair_space>of<seq2seq4repair_space>regressor<seq2seq4repair_space>list<seq2seq4repair_space>is<seq2seq4repair_space>less<seq2seq4repair_space>that<seq2seq4repair_space>numberOfVariables" ) ; } if ( ! ( this . hasIntercept ) ) { <START_BUG> include ( Arrays . copyOf ( x , x . length ) , 1.0 , y ) ; <END_BUG> } else { double [ ] tmp = new double [ ( x . length ) + 1 ] ; System . arraycopy ( x , 0 , tmp , 1 , x . length ) ; tmp [ 0 ] = 1.0 ; include ( tmp , 1.0 , y ) ; } ++ ( nobs ) ; return ; } public void addObservations ( double [ ] [ ] x , double [ ] y ) { } private void include ( final double [ ] x , final double wi , final double yi ) { } private double smartAdd ( double a , double b ) { } public void clear ( ) { } private void tolset ( ) { } private double [ ] regcf ( int nreq ) { } private void singcheck ( ) { } private void ss ( ) { } private double [ ] cov ( int nreq ) { } private void inverse ( double [ ] rinv , int nreq ) { } public double [ ] getPartialCorrelations ( int in ) { } private void vmove ( int from , int to ) { } private int reorderRegressors ( int [ ] list , int pos1 ) { } public double getDiagonalOfHatMatrix ( double [ ] row_data ) { } public int [ ] getOrderOfRegressors ( ) { } public RegressionResults regress ( ) throws MathException { } public RegressionResults regress ( int numberOfRegressors ) throws MathException { } public RegressionResults regress ( int [ ] variablesToInclude ) throws MathException { } }

Fix:
include ( MathUtils . copyOf ( x , x . length ) , 1.0 , y ) ;
Buggy code:
public abstract class AbstractVector implements Vector { private transient Map < String , Integer > bindings ; private String name ; protected int size ; protected double lengthSquared = - 1.0 ; protected AbstractVector ( ) { } protected AbstractVector ( String name ) { } protected AbstractVector ( String name , int size ) { } public double aggregate ( BinaryFunction aggregator , UnaryFunction map ) { } public double aggregate ( Vector other , BinaryFunction aggregator , BinaryFunction combiner ) { } protected abstract Matrix matrixLike ( int rows , int columns ) { } public Vector viewPart ( int offset , int length ) { } @ Override public Vector clone ( ) { } public Vector divide ( double x ) { } public double dot ( Vector x ) { } public double dotSelf ( ) { } public double get ( int index ) { } public Vector minus ( Vector x ) { } public Vector normalize ( ) { } public Vector normalize ( double power ) { } public double norm ( double power ) { } public double getLengthSquared ( ) { } public double getDistanceSquared ( Vector v ) { } public double maxValue ( ) { } public int maxValueIndex ( ) { } public Vector plus ( double x ) { } public Vector plus ( Vector x ) { } public void addTo ( Vector v ) { } public void set ( int index , double value ) { if ( ( index >= 0 ) && ( index < ( size ( ) ) ) ) { setQuick ( index , value ) ; } else { <START_BUG> throw new IndexException ( ) ; <END_BUG> } } public Vector times ( double x ) { } public Vector times ( Vector x ) { } public double zSum ( ) { } public Vector assign ( double value ) { } public Vector assign ( double [ ] values ) { } public Vector assign ( Vector other ) { } public Vector assign ( BinaryFunction f , double y ) { } public Vector assign ( UnaryFunction function ) { } public Vector assign ( Vector other , BinaryFunction function ) { } public Matrix cross ( Vector other ) { } public static Vector decodeVector ( String formattedString ) { } public String getName ( ) { } public void setName ( String name ) { } public int size ( ) { } public String asFormatString ( ) { } public static boolean equivalent ( Vector left , Vector right ) { } public static boolean strictEquivalence ( Vector left , Vector right ) { } @ Override public int hashCode ( ) { } public double get ( String label ) throws IndexException , UnboundLabelException { } public Map < String , Integer > getLabelBindings ( ) { } public void set ( String label , double value ) throws IndexException , UnboundLabelException { } public void setLabelBindings ( Map < String , Integer > bindings ) { } public void set ( String label , int index , double value ) throws IndexException { } }

Fix:
throw new IndexException ( index , size ( ) ) ;
Buggy code:
@ AllArgsConstructor public class XmlToCampaignParser implements XmlToObjectParser < Campaign > { private static final DateTimeFormatter dateFormatter = DateTimeFormat . forPattern ( "yyyy-MM-dd" ) ; private static final DateTimeFormatter timeFormatter = DateTimeFormat . forPattern ( "HH:mm" ) ; private ResponseParser responseParser ; @ Override public Campaign parse ( ) { } private Campaign parseAndSetOverviewAttributes ( final ResponseParser parser , Campaign campaign ) { } private Campaign parseAndSetScheduleAttributes ( final ResponseParser parser , Campaign campaign ) { } private Campaign parseAndSetTargetingAttributes ( final ResponseParser parser , Campaign campaign ) { } private Campaign parseAndSetBillingAttributes ( final ResponseParser parser , Campaign campaign ) { } private List < GeneralCampaignTargeting > parseAndCreateGeneralTargeting ( final ResponseParser parser ) { } private ZoneCampaignTargeting parseAndCreateZoneTargeting ( final ResponseParser parser ) { <START_BUG> final ZoneCampaignTargeting targeting = new ZoneCampaignTargeting ( TargetingCode . ZONE ) ; <END_BUG> populateTargetingValues ( targeting , ZONE , parser ) ; return targeting ; } private void populateTargetingExcludeFlag ( final AbstractExcludableCampaignTargeting targeting , final ResponseParser parser , TargetingCode targetingCode ) { } private void populateTargetingValues ( AbstractCampaignTargeting targeting , TargetingCode targetingCode , final ResponseParser parser ) { } private RdbTargeting parseAndCreateRdbTargeting ( final ResponseParser parser ) { } private SegmentTargeting parseAndCreateSegmentTargeting ( final ResponseParser parser ) { } }

Fix:
final ZoneCampaignTargeting targeting = new ZoneCampaignTargeting ( ) ;
Buggy code:
public class VoteTabCompleter implements TabCompleter { Main plugin = Main . plugin ; @ Override public List < String > onTabComplete ( CommandSender sender , Command cmd , String alias , String [ ] args ) { if ( ( cmd . getName ( ) . equalsIgnoreCase ( "vote" ) ) || ( cmd . getName ( ) . equalsIgnoreCase ( "v" ) ) ) { List < String > tab = new ArrayList < String > ( ) ; if ( ( args . length ) == 1 ) { List < String > cmds = new ArrayList < String > ( ) ; for ( CommandHandler commandHandler : plugin . voteCommand ) { String [ ] cmdArgs = commandHandler . getArgs ( ) ; if ( ( cmdArgs . length ) > 0 ) { if ( ! ( cmds . contains ( cmdArgs [ 0 ] ) ) ) { cmds . add ( cmdArgs [ 0 ] ) ; } } } for ( int i = 0 ; i < ( cmds . size ( ) ) ; i ++ ) { if ( Utils . getInstance ( ) . startsWithIgnoreCase ( cmds . get ( i ) , args [ 0 ] ) ) { tab . add ( cmds . get ( i ) ) ; } } return tab ; } else if ( ( args . length ) == 2 ) { List < String > cmds = new ArrayList < String > ( ) ; for ( CommandHandler commandHandler : plugin . voteCommand ) { String [ ] cmdArgs = commandHandler . getArgs ( ) ; if ( ( cmdArgs . length ) > 1 ) { if ( cmdArgs [ 0 ] . equalsIgnoreCase ( args [ 0 ] ) ) { if ( cmdArgs [ 1 ] . equalsIgnoreCase ( "player" ) ) { for ( Object playerOb : Bukkit . getOnlinePlayers ( ) . toArray ( ) ) { Player player = ( ( Player ) ( playerOb ) ) ; cmds . add ( player . getName ( ) ) ; } } else if ( cmdArgs [ 1 ] . equalsIgnoreCase ( "sitename" ) ) { cmds . addAll ( ConfigVoteSites . getInstance ( ) . getVoteSitesNames ( ) ) ; } else { <START_BUG> cmds . add ( cmdArgs [ 0 ] ) ; <END_BUG> } } } } for ( int i = 0 ; i < ( cmds . size ( ) ) ; i ++ ) { if ( Utils . getInstance ( ) . startsWithIgnoreCase ( cmds . get ( i ) , args [ 1 ] ) ) { tab . add ( cmds . get ( i ) ) ; } } return tab ; } } return null ; } }

Fix:
cmds . add ( cmdArgs [ 1 ] ) ;
Buggy code:
public class ClientPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { public static final String CONTAINER_TYPE = "CONTAINER_TYPE" ; public static final String TARGET_SERVER = "TARGET_SERVER" ; public static final String CHANNEL_ID = "CHANNEL_ID" ; public static final String LOCAL_NAME = "LOCAL_NAME" ; protected void performDefaults ( ) { } public ClientPreferencePage ( ) { } public void createFieldEditors ( ) { addField ( new org . eclipse . jface . preference . StringFieldEditor ( ClientPreferencePage . CONTAINER_TYPE , "Container<seq2seq4repair_space>Type:" , this . getFieldEditorParent ( ) ) ) ; addField ( new org . eclipse . jface . preference . StringFieldEditor ( ClientPreferencePage . TARGET_SERVER , "ECF<seq2seq4repair_space>Server<seq2seq4repair_space>URL:" , this . getFieldEditorParent ( ) ) ) ; <START_BUG> addField ( new org . eclipse . jface . preference . StringFieldEditor ( ClientPreferencePage . CHANNEL_ID , "Channel<seq2seq4repair_space>(Group)<seq2seq4repair_space>Name:" , this . getFieldEditorParent ( ) ) ) ; <END_BUG> addField ( new org . eclipse . jface . preference . StringFieldEditor ( ClientPreferencePage . LOCAL_NAME , "Your<seq2seq4repair_space>Name:" , this . getFieldEditorParent ( ) ) ) ; } public void init ( IWorkbench workbench ) { } public void initializeDefaults ( ) { } }

Fix:
addField ( new org . eclipse . jface . preference . StringFieldEditor ( ClientPreferencePage . CHANNEL_ID , "ChatRoomTab<seq2seq4repair_space>(Group)<seq2seq4repair_space>Name:" , this . getFieldEditorParent ( ) ) ) ;
Buggy code:
@ Controller @ RequestMapping ( "//event" ) public class EventManagementController { @ Autowired EventRepository eventRepository ; @ Autowired DivisionRepository divisionRepository ; private static Logger logger = LoggerFactory . getLogger ( EventManagementController . class ) ; @ RequestMapping ( value = "getEventsOfMonth" , produces = "application//json" ) @ ResponseBody public List < LocalDate > getEventDatesOfMonth ( @ RequestParam String month , @ RequestParam String year ) { } @ RequestMapping ( value = "getEventsOfDate" , produces = "application//json" ) @ ResponseBody public List < Event > getEventsOfDate ( @ RequestParam String date ) { } @ RequestMapping ( value = "getEvent" , produces = "application//json" ) @ ResponseBody public Event getEvent ( @ RequestParam String id , @ CurrentUser User currentUser ) { if ( id . isEmpty ( ) ) { EventManagementController . logger . warn ( "The<seq2seq4repair_space>ID<seq2seq4repair_space>can<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>empty." ) ; return null ; } else { Event selectedEvent = eventRepository . findEventById ( id ) ; if ( selectedEvent == null ) { EventManagementController . logger . warn ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>specified<seq2seq4repair_space>element." ) ; return null ; } else { if ( ! ( currentUser . isAllowedToAdministrate ( selectedEvent ) ) ) { selectedEvent . setAdministrationNotAllowedMessage ( "You<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>allowed<seq2seq4repair_space>to<seq2seq4repair_space>modify<seq2seq4repair_space>this<seq2seq4repair_space>event,<seq2seq4repair_space>since<seq2seq4repair_space>you<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>it." ) ; } if ( ( selectedEvent . getInvitedDivision ( ) ) != null ) { selectedEvent . getInvitedDivision ( ) . parallelStream ( ) . forEach ( ( division ) -> division . setAdminUser ( null ) ) ; } <START_BUG> if ( ( selectedEvent . getEventAdmin ( ) . getDivisions ( ) ) != null ) { <END_BUG> selectedEvent . getEventAdmin ( ) . getDivisions ( ) . parallelStream ( ) . forEach ( ( division ) -> division . setAdminUser ( null ) ) ; } return selectedEvent ; } } } @ RequestMapping ( method = RequestMethod . POST ) @ ResponseBody public ResponseEntity < String > saveEvent ( @ RequestParam String eventFlag , @ RequestParam String eventName , @ RequestParam String eventDescription , @ RequestParam String startDate , @ RequestParam String startTime , @ RequestParam String endDate , @ RequestParam String endTime , @ RequestParam String location , @ RequestParam String locationLat , @ RequestParam String locationLng , @ RequestParam String invitedDivisions , @ CurrentUser User currentUser ) { } @ RequestMapping ( method = RequestMethod . POST , value = "deleteEvent" ) @ ResponseBody public ResponseEntity < String > saveEvent ( @ RequestParam String id , @ CurrentUser User currentUser ) { } }

Fix:
if ( ( ( selectedEvent . getEventAdmin ( ) ) != null ) && ( ( selectedEvent . getEventAdmin ( ) . getDivisions ( ) ) != null ) ) {
Buggy code:
public enum RuleFieldValidator { CLASS_RULE_VALIDATOR ( ClassRule . class , false , true ) , RULE_VALIDATOR ( Rule . class , false , false ) , CLASS_RULE_METHOD_VALIDATOR ( ClassRule . class , true , true ) , RULE_METHOD_VALIDATOR ( Rule . class , true , false ) ; private final Class < ? extends Annotation > fAnnotation ; private final boolean fStaticMembers ; private final boolean fMethods ; private RuleFieldValidator ( Class < ? extends Annotation > annotation , boolean methods , boolean fStaticMembers ) { } public void validate ( TestClass target , List < Throwable > errors ) { } private void validateMember ( FrameworkMember < ? > member , List < Throwable > errors ) { } private void validatePublicClass ( FrameworkMember < ? > member , List < Throwable > errors ) { } private void validateStatic ( FrameworkMember < ? > member , List < Throwable > errors ) { if ( ( fStaticMembers ) && ( ! ( member . isStatic ( ) ) ) ) { addError ( errors , member , "must<seq2seq4repair_space>be<seq2seq4repair_space>static." ) ; } if ( ( ! ( fStaticMembers ) ) && ( member . isStatic ( ) ) ) { <START_BUG> addError ( errors , member , "must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>static." ) ; <END_BUG> } } private void validatePublic ( FrameworkMember < ? > member , List < Throwable > errors ) { } private void validateTestRuleOrMethodRule ( FrameworkMember < ? > member , List < Throwable > errors ) { } private boolean isDeclaringClassPublic ( FrameworkMember < ? > member ) { } private boolean isTestRule ( FrameworkMember < ? > member ) { } private boolean isMethodRule ( FrameworkMember < ? > member ) { } private void addError ( List < Throwable > errors , FrameworkMember < ? > member , String suffix ) { } }

Fix:
addError ( errors , member , "must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>static<seq2seq4repair_space>or<seq2seq4repair_space>it<seq2seq4repair_space>has<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>annotated<seq2seq4repair_space>with<seq2seq4repair_space>@ClassRule." ) ;
Buggy code:
public class DiagramView extends View { private Diagram mDiagram ; public DiagramView ( Context context , AttributeSet attrs ) { } public DiagramView ( Context context ) { } @ Override protected void onDraw ( Canvas canvas ) { <START_BUG> MyLog . v ( "onDraw" ) ; <END_BUG> if ( ( mDiagram ) != null ) { if ( ( mDiagram . getCenter ( ) ) == null ) { PointF center = new PointF ( ( ( getWidth ( ) ) // 2 ) , ( ( getHeight ( ) ) // 2 ) ) ; mDiagram . setCenter ( center ) ; } mDiagram . draw ( canvas ) ; } super . onDraw ( canvas ) ; } public Diagram getDiagram ( ) { } public void setDiagram ( Diagram d ) { } }

Fix:
MyLog . v ( "DiagramView.<seq2seq4repair_space>onDraw" ) ;
Buggy code:
public class HintedHandOffManager { public static final HintedHandOffManager instance = new HintedHandOffManager ( ) ; private static final Logger logger_ = Logger . 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 , String 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 ) ; for ( ColumnFamilyStore cfstore : table . getColumnFamilyStores ( ) ) { ColumnFamily cf = cfstore . getColumnFamily ( new IdentityQueryFilter ( key , 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 ) ; <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 void deliverHints ( final InetAddress to ) { } }

Fix:
WriteResponseHandler responseHandler = new WriteResponseHandler ( 1 , tableName ) ;