nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Scope { protected final Map classLoaders = new HashMap ( ) ; protected final Map dependencies = new HashMap ( ) ; protected final Map classLocations = new HashMap ( ) ; protected final Map resourceLocations = new HashMap ( ) ; protected final Log log ; public Scope ( Log log ) { } public ScopedURLClassLoader registerClassLoader ( ScopedURLClassLoader loader ) { } public ScopedURLClassLoader deRegisterClassLoader ( ScopedURLClassLoader loader ) { } protected void clearByValue ( Map map , Object value ) { } public Set getDependentClassLoaders ( ScopedURLClassLoader loader ) { } protected boolean addDependency ( ScopedURLClassLoader source , ScopedURLClassLoader target ) { } <START_BUG> public Class loadClass ( String className , ScopedURLClassLoader source , boolean resolve ) throws ClassNotFoundException { <END_BUG> synchronized ( classLoaders ) { ScopedURLClassLoader target = ( ( ScopedURLClassLoader ) ( classLocations . get ( className ) ) ) ; if ( target != null ) { addDependency ( source , target ) ; return target . loadClass ( className , resolve ) ; } Iterator allLoaders = classLoaders . values ( ) . iterator ( ) ; while ( allLoaders . hasNext ( ) ) { target = ( ( ScopedURLClassLoader ) ( allLoaders . next ( ) ) ) ; if ( ! ( target . equals ( source ) ) ) { try { Class foundClass = target . loadClassProperly ( className , resolve ) ; classLocations . put ( className , target ) ; addDependency ( source , target ) ; return foundClass ; } catch ( ClassNotFoundException e ) { } } } throw new ClassNotFoundException ( ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>resolve<seq2seq4repair_space>class<seq2seq4repair_space>" + className ) + "<seq2seq4repair_space>in<seq2seq4repair_space>scope." ) ) ; } } public URL getResource ( String name , ScopedURLClassLoader source ) { } }

Fix:
public Class loadClass ( String className , boolean resolve , ScopedURLClassLoader source ) throws ClassNotFoundException {
Buggy code:
public class WordCount { public static class MyMapper extends Mapper < Text , BytesWritable , Text , IntWritable > { private static final IntWritable one = new IntWritable ( 1 ) ; private Text word = new Text ( ) ; public void map ( Text key , BytesWritable value , Context context ) throws IOException , InterruptedException { String filename = key . toString ( ) ; filename = filename . substring ( 0 , filename . indexOf ( ".gz" ) ) ; String content = new String ( value . getBytes ( ) ) ; Path outputPath = FileOutputFormat . getOutputPath ( context ) ; URI uri = outputPath . toUri ( ) ; <START_BUG> FileUtils . writeByteArrayToFile ( new File ( ( ( ( uri . getPath ( ) ) + "1//" ) + filename ) ) , value . copyBytes ( ) ) ; <END_BUG> } } public static void main ( String [ ] args ) throws Exception { } No newline ; at end ; of file ; }

Fix:
FileUtils . writeByteArrayToFile ( new File ( ( ( ( uri . getPath ( ) ) + "//" ) + filename ) ) , value . copyBytes ( ) ) ;
Buggy code:
public class ModifyTimbre extends ListActivity { private static final int COPY_ID = 0 ; private static final int DELETE_ID = 1 ; private LinkedList < Oscillator > timbres ; private TimbreAdapter adapter ; @ Override public void onCreate ( Bundle savedInstanceState ) { } public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void onCreateContextMenu ( ContextMenu menu , View v , ContextMenuInfo menuInfo ) { } @ Override public boolean onContextItemSelected ( MenuItem item ) { AdapterView . AdapterContextMenuInfo info = ( ( AdapterView . AdapterContextMenuInfo ) ( item . getMenuInfo ( ) ) ) ; <START_BUG> switch ( info . position ) { <END_BUG> case ModifyTimbre . COPY_ID : Oscillator o = timbres . get ( info . position ) ; Oscillator copy = InstrumentManager . copyInstrument ( o ) ; timbres . add ( copy ) ; break ; case ModifyTimbre . DELETE_ID : timbres . remove ( info . position ) ; break ; default : } adapter . notifyDataSetChanged ( ) ; return true ; } public void exit ( ) { } @ Override public boolean onKeyDown ( int keyCode , KeyEvent event ) { } }

Fix:
switch ( item . getItemId ( ) ) {
Buggy code:
@ Named ( "connectionBean" ) @ RequestScoped public class ConnectionBean { private static final Logger LOGGER = Logger . getLogger ( ConnectionBean . class . getName ( ) ) ; @ EJB private IUserManagerLocal userManager ; private String login ; private String password ; private String originURL ; public ConnectionBean ( ) { } public String logOut ( ) throws IOException , ServletException { ExternalContext ec = FacesContext . getCurrentInstance ( ) . getExternalContext ( ) ; HttpServletRequest request = ( ( HttpServletRequest ) ( ec . getRequest ( ) ) ) ; request . logout ( ) ; request . getSession ( ) . invalidate ( ) ; HttpSession newSession = request . getSession ( true ) ; newSession . setAttribute ( "hasFail" , false ) ; newSession . setAttribute ( "hasLogout" , true ) ; <START_BUG> return ( request . getContextPath ( ) ) + "//" ; <END_BUG> } public void logIn ( ) throws AccountNotFoundException , IOException , ServletException { } public String getLogin ( ) { } public void setLogin ( String login ) { } public String getPassword ( ) { } public void setPassword ( String password ) { } public String getOriginURL ( ) { } public void setOriginURL ( String originURL ) { } private boolean tryLogin ( HttpServletRequest request ) { } private void checkAccount ( HttpServletRequest request ) throws AccountNotFoundException , ServletException { } private void redirectionPostLogin ( HttpServletRequest request , ExternalContext ec ) throws IOException { } }

Fix:
return "//login.xhtml" ;
Buggy code:
public class Photo { private String name ; private String path ; private String image ; public Photo ( String path , String name ) { } public String getName ( ) { } public String getPath ( ) { } public String getData ( ) { } private String encodeImage ( ) { System . out . println ( path ) ; File file = new File ( path ) ; String imageDataString = null ; try { FileInputStream imageInFile = new FileInputStream ( file ) ; byte [ ] imageData = new byte [ ( ( int ) ( file . length ( ) ) ) ] ; imageInFile . read ( imageData ) ; <START_BUG> imageDataString = Base64 . encodeBase64URLSafeString ( imageData ) ; <END_BUG> imageInFile . close ( ) ; System . out . println ( ( ( ( ( "Image<seq2seq4repair_space>" + ( path ) ) + "\\" ) + ( name ) ) + "<seq2seq4repair_space>Successfully<seq2seq4repair_space>Manipulated!" ) ) ; } catch ( FileNotFoundException e ) { System . out . println ( ( "Image<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>" + e ) ) ; } catch ( IOException ioe ) { System . out . println ( ( "Exception<seq2seq4repair_space>while<seq2seq4repair_space>reading<seq2seq4repair_space>the<seq2seq4repair_space>Image<seq2seq4repair_space>" + ioe ) ) ; } return imageDataString ; } }

Fix:
imageDataString = Base64 . encodeBase64String ( imageData ) ;
Buggy code:
public class StereotypeType extends AbstractTypeImpl { private Log log = LogFactory . getLog ( getClass ( ) ) ; Stereotype stereoType ; public StereotypeType ( TypeSystem typeSystem , String name , Stereotype stereoType ) { } @ Override public Feature [ ] getContributedFeatures ( ) { } private boolean isStereoTypeAssignable ( Stereotype st1 , Stereotype st2 ) { } public boolean isInstance ( Object o ) { } public Object newInstance ( ) { } private Set < Type > superTypes = null ; @ Override public Set < Type > getSuperTypes ( ) { if ( ( superTypes ) == null ) { superTypes = new HashSet < Type > ( ) ; List < Classifier > all = new ArrayList < Classifier > ( stereoType . getExtendedMetaclasses ( ) ) ; all . addAll ( stereoType . getSuperClasses ( ) ) ; for ( Classifier classifier : all ) { String superTypeName = getFullName ( classifier ) ; Type t = getTypeSystem ( ) . getTypeForName ( superTypeName ) ; if ( t == null ) { <START_BUG> log . warn ( ( "Couldn't<seq2seq4repair_space>resolve<seq2seq4repair_space>super<seq2seq4repair_space>type<seq2seq4repair_space>" + superTypeName ) ) ; <END_BUG> } else { superTypes . add ( t ) ; } } } return Collections . unmodifiableSet ( superTypes ) ; } public Stereotype getStereoType ( ) { } private String getFullName ( Object object ) { } private String getFullyQualifiedName ( final ENamedElement ele ) { } private String getFqnRec ( final EObject ele , final String suffix ) { } @ Override protected boolean internalIsAssignableFrom ( Type t ) { } protected boolean isCompatible ( Type t ) { } private static String normalizedName ( String name ) { } }

Fix:
log . error ( ( "Couldn't<seq2seq4repair_space>resolve<seq2seq4repair_space>type<seq2seq4repair_space>" + superTypeName ) ) ;
Buggy code:
public class PluginProject extends ConfigSource { public static final String PLUGIN_XML = "vex-plugin.xml" ; public static final String PROJECT_CONFIG_SER = ".vexConfig.ser" ; protected PluginProject ( IProject project ) { } public void cleanState ( ) throws CoreException { } public static PluginProject get ( IProject project ) { } public URL getBaseUrl ( ) { try { <START_BUG> return this . getProject ( ) . getLocation ( ) . toFile ( ) . toURL ( ) ; <END_BUG> } catch ( MalformedURLException e ) { throw new RuntimeException ( Messages . getString ( "PluginProject.malformedUrl" ) , e ) ; } } public IProject getProject ( ) { } public static PluginProject load ( IProject project ) { } public void parseConfigXml ( ) throws IOException , SAXException { } public void saveState ( ) throws IOException , CoreException { } public void writeConfigXml ( ) throws IOException , CoreException { } private String projectPath ; public static final String SER_FILE = ".vexConfig.ser" ; private static void writeElement ( IConfigElement element , PrintWriter out , int level ) { } }

Fix:
return this . getProject ( ) . getLocation ( ) . toFile ( ) . toURI ( ) . toURL ( ) ;
Buggy code:
public class WikiLinkRand100Filter { public static void main ( String [ ] args ) throws IOException { <START_BUG> if ( ( args . length ) != 3 ) { <END_BUG> System . out . println ( "Usage:<seq2seq4repair_space>SurfaceFormDictionary<seq2seq4repair_space><wiki-link-file-randomized><seq2seq4repair_space><out>" ) ; return ; } String in = args [ 0 ] ; String out = args [ 1 ] ; Map < String , Integer > sentenceCountsPerLemma = new HashMap < String , Integer > ( ) ; BufferedReader reader = new BufferedReader ( new MonitoredFileReader ( in ) ) ; BufferedWriter writer = FileUtil . createWriter ( out ) ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { String [ ] cols = line . split ( "\t" ) ; if ( ( cols . length ) != 2 ) { System . err . println ( ( "Malformatted<seq2seq4repair_space>sentence-links<seq2seq4repair_space>line:<seq2seq4repair_space>" + line ) ) ; continue ; } String sentence = cols [ 0 ] ; String links = cols [ 1 ] ; Scanner s = new Scanner ( links ) ; s . useDelimiter ( "<seq2seq4repair_space>" ) ; if ( s . hasNext ( ) ) { try { String link = s . next ( ) ; String [ ] linkParts = link . split ( "@@" ) ; String lemma = linkParts [ 0 ] ; Integer count = sentenceCountsPerLemma . get ( lemma ) ; if ( count == null ) { count = 0 ; } if ( count != 100 ) { writer . write ( ( ( ( ( ( lemma + "\t" ) + sentence ) + "\t" ) + link ) + "\n" ) ) ; sentenceCountsPerLemma . put ( lemma , ( count + 1 ) ) ; } } catch ( Exception e ) { System . err . println ( ( "Malformatted<seq2seq4repair_space>link<seq2seq4repair_space>column:<seq2seq4repair_space>" + links ) ) ; break ; } } s . close ( ) ; } reader . close ( ) ; writer . close ( ) ; } }

Fix:
if ( ( args . length ) != 2 ) {
Buggy code:
public class CodeSnippetFieldReference extends FieldReference implements ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetFieldReference ( char [ ] source , long pos , EvaluationContext evaluationContext ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo , boolean isReadAccess ) { if ( ! ( flowInfo . isReachable ( ) ) ) return ; if ( ( this . binding ) instanceof ParameterizedFieldBinding ) { ParameterizedFieldBinding parameterizedField = ( ( ParameterizedFieldBinding ) ( this . binding ) ) ; this . codegenBinding = parameterizedField . originalField ; if ( this . codegenBinding . type . isTypeVariable ( ) ) { TypeVariableBinding variableReturnType = ( ( TypeVariableBinding ) ( this . codegenBinding . type ) ) ; if ( ( variableReturnType . firstBound ) != ( parameterizedField . type ) ) { this . genericCast = parameterizedField . type . erasure ( ) ; } } } else { this . codegenBinding = this . binding ; } TypeBinding someReceiverType = ( ( this . delegateThis ) != null ) ? this . delegateThis . type : this . receiverType ; if ( ( ( ( ( this . binding . declaringClass ) != someReceiverType ) && ( ! ( someReceiverType . isArrayType ( ) ) ) ) && ( ( this . binding . declaringClass ) != null ) ) && ( ! ( this . binding . isConstantValue ( ) ) ) ) { <START_BUG> CompilerOptions options = currentScope . environment ( ) . options ; <END_BUG> if ( ( ( ( ( options . targetJDK ) >= ( ClassFileConstants . JDK1_2 ) ) && ( ( ( ( options . complianceLevel ) >= ( ClassFileConstants . JDK1_4 ) ) || ( ! ( receiver . isImplicitThis ( ) ) ) ) || ( ! ( this . codegenBinding . isStatic ( ) ) ) ) ) && ( ( this . binding . declaringClass . id ) != ( TypeIds . T_JavaLangObject ) ) ) || ( ! ( this . binding . declaringClass . canBeSeenBy ( currentScope ) ) ) ) { this . codegenBinding = currentScope . enclosingSourceType ( ) . getUpdatedFieldBinding ( this . codegenBinding , ( ( ReferenceBinding ) ( someReceiverType . erasure ( ) ) ) ) ; } } } public TypeBinding resolveType ( BlockScope scope ) { } }

Fix:
CompilerOptions options = currentScope . compilerOptions ( ) ;
Buggy code:
public class RearrangeMenus { public static final String [ ] MENU_ITEMS_TO_REMOVE = new String [ ] { "openWorkspace" , "helpSearch" } ; public static final Map < String , String > MENU_IMAGES = new HashMap ( ) { } ; public static void run ( ) { final IWorkbenchWindow window = Workbench . getInstance ( ) . getActiveWorkbenchWindow ( ) ; <START_BUG> REFRESH . create ( window ) . setImageDescriptor ( GamaIcons . create ( "navigator//refresh2" ) . descriptor ( ) ) ; <END_BUG> if ( window instanceof WorkbenchWindow ) { final IMenuManager menuManager = ( ( WorkbenchWindow ) ( window ) ) . getMenuManager ( ) ; for ( IContributionItem item : menuManager . getItems ( ) ) { IMenuManager menu = null ; if ( item instanceof MenuManager ) { menu = ( ( MenuManager ) ( item ) ) ; } else if ( item instanceof ActionSetContributionItem ) { menu = ( ( MenuManager ) ( ( ( ActionSetContributionItem ) ( item ) ) . getInnerItem ( ) ) ) ; } if ( menu != null ) { RearrangeMenus . removeUnwantedItems ( menu ) ; RearrangeMenus . changeFileIcons ( menu ) ; } } menuManager . updateAll ( true ) ; } } private static void removeUnwantedItems ( final IMenuManager menu ) { } private static void changeFileIcons ( final IMenuManager menu ) { } private static void changeIcon ( final IMenuManager menu , final IContributionItem item ) { } }

Fix:
REFRESH . create ( window ) . setImageDescriptor ( GamaIcons . create ( "navigator//navigator.refresh2" ) . descriptor ( ) ) ;
Buggy code:
public class AttributeComparator extends AbstractComparator { private final List < String > ignoreAttributes = new ArrayList < String > ( ) ; public AttributeComparator ( String ... attributes ) { } @ Override public String normalize ( String dom ) { String strippedDom = dom ; for ( String attribute : ignoreAttributes ) { String regExp = ( "\\s" + attribute ) + "=\"[^\"]*\"" ; <START_BUG> strippedDom = dom . replaceAll ( regExp , "" ) ; <END_BUG> } return strippedDom ; } }

Fix:
strippedDom = strippedDom . replaceAll ( regExp , "" ) ;
Buggy code:
public final class ZeroExceptionHandler implements ExceptionHandler { public void handle ( final HttpServletRequest request , final HttpServletResponse response , final Exception exception ) throws IOException { if ( exception instanceof UnauthorizedException ) { <START_BUG> UnauthorizedException unauthorizedException = ( ( UnauthorizedException ) ( exception ) ) ; <END_BUG> response . setStatus ( UNAUTHORIZED . toInteger ( ) ) ; response . setHeader ( "WWW-Authenticate" , unauthorizedException . getAuthorizationHeader ( ) ) ; } else if ( exception instanceof ForbiddenException ) { response . setStatus ( FORBIDDEN . toInteger ( ) ) ; } else if ( exception instanceof NotFoundException ) { response . setStatus ( NOT_FOUND . toInteger ( ) ) ; } else if ( exception instanceof MethodNotAllowedException ) { response . setStatus ( METHOD_NOT_ALLOWED . toInteger ( ) ) ; } else if ( exception instanceof UnsupportedMediaTypeException ) { response . setStatus ( UNSUPPORTED_MEDIA_TYPE . toInteger ( ) ) ; } else if ( exception instanceof BadRequestException ) { response . setStatus ( BAD_REQUEST . toInteger ( ) ) ; } else { response . setStatus ( INTERNAL_SERVER_ERROR . toInteger ( ) ) ; } response . setContentType ( "text//plain" ) ; exception . printStackTrace ( response . getWriter ( ) ) ; } }

Fix:
final UnauthorizedException unauthorizedException = ( ( UnauthorizedException ) ( exception ) ) ;
Buggy code:
public interface Serializer < T > extends Serializable { byte [ ] serialize ( T obj ) { } <START_BUG> T deserialize ( byte [ ] b ) ; <END_BUG> }

Fix:
Object deserialize ( byte [ ] b ) ;
Buggy code:
public class SelectionOnSuperReference extends SuperReference { public SelectionOnSuperReference ( int pos , int sourceEnd ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { TypeBinding binding = super . resolveType ( scope ) ; if ( ( binding == null ) || ( ! ( binding . isValidBinding ( ) ) ) ) throw new SelectionNodeFound ( ) ; else <START_BUG> throw new SelectionNodeFound ( this , binding ) ; <END_BUG> } }

Fix:
throw new SelectionNodeFound ( binding ) ;
Buggy code:
public class CommandResponseMarshaller implements RpcDispatcher . Marshaller { private final MarshallingContext context ; private final int currentVersion ; CommandResponseMarshaller ( MarshallingContext context , int currentVersion ) { } @ Override public Buffer objectToBuffer ( Object object ) throws Exception { try ( ByteArrayOutputStream output = new ByteArrayOutputStream ( ) ) { <START_BUG> output . write ( currentVersion ) ; <END_BUG> try ( Marshaller marshaller = this . context . createMarshaller ( this . currentVersion ) ) { marshaller . start ( Marshalling . createByteOutput ( output ) ) ; marshaller . writeObject ( object ) ; marshaller . flush ( ) ; } return new Buffer ( output . toByteArray ( ) ) ; } } @ Override public Object objectFromBuffer ( byte [ ] buffer , int offset , int length ) throws Exception { } }

Fix:
output . write ( this . currentVersion ) ;
Buggy code:
public class Process { public static boolean enableDebug = true ; final int HEART_BEAT_PERIOD = 500 ; static Config config ; String configPath ; final ConcurrentLinkedQueue < String > queue ; public int processId ; NetController controller ; public Playlist playlist = new Playlist ( ) ; public Map < Integer , Long > upProcess ; int coordinatorNumber ; static int delay ; List < Integer > dieAfter = new ArrayList < Integer > ( ) ; List < Integer > partialCommit = new ArrayList < Integer > ( ) ; DTLog dtLog ; Transaction currentTransaction ; Transaction prevTransaction ; TransactionState prevTransactionState ; boolean hasCoordinatorBeenSelected = false ; Process ( int processId ) { } public static void main ( String [ ] args ) { } private void processCommandLine ( ) { } private boolean readStateFromLog ( ) { } public void pumpHeartBeat ( ) { } private void processMsgQueue ( ) { } protected void startCoordinatorRecoveryTransaction ( Message message ) { } public void updateProcessList ( Message message ) { } public void syncUpProcess ( ) { } public void notifyTransactionComplete ( ) { if ( ( currentTransaction . state ) == ( TransactionState . COMMIT ) ) { if ( ! ( currentTransaction . command . contains ( "=" ) ) ) { playlist . removeSong ( currentTransaction . command . trim ( ) ) ; } else { String [ ] str = currentTransaction . command . split ( "=" ) ; <START_BUG> if ( ( str . length ) == 3 ) { <END_BUG> playlist . addSong ( str [ 0 ] , str [ 1 ] ) ; } else { playlist . editSong ( str [ 0 ] , str [ 1 ] , str [ 2 ] ) ; } } PlaylistLog . updateStateFile ( this ) ; } if ( ( ( currentTransaction ) instanceof RecoveryTransaction ) && ( ( processId ) == 0 ) ) { Message msg = new Message ( processId , MessageType . GIVE_COORDINATOR , "-" ) ; controller . sendMsgs ( upProcess . keySet ( ) , msg . toString ( ) , ( - 1 ) ) ; Thread th = new Thread ( ) { public void run ( ) { try { Thread . sleep ( 2000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } if ( ! ( hasCoordinatorBeenSelected ) ) { coordinatorNumber = 0 ; } } } ; th . start ( ) ; } prevTransactionState = currentTransaction . state ; Process . config . logger . info ( ( "Transaction<seq2seq4repair_space>is<seq2seq4repair_space>complete.<seq2seq4repair_space>State:<seq2seq4repair_space>" + ( currentTransaction . state ) ) ) ; System . out . println ( ( ( ( "Process:<seq2seq4repair_space>" + ( processId ) ) + "'s<seq2seq4repair_space>transaction<seq2seq4repair_space>is<seq2seq4repair_space>complete.<seq2seq4repair_space>State:<seq2seq4repair_space>" ) + ( currentTransaction . state ) ) ) ; currentTransaction = null ; } public void startNewTransaction ( Message message ) { } public static void waitTillDelay ( ) { } }

Fix:
if ( ( str . length ) != 3 ) {
Buggy code:
public final class CSVPrinter implements Closeable , Flushable { private final Appendable out ; private final CSVFormat format ; private boolean newRecord = true ; public CSVPrinter ( final Appendable out , final CSVFormat format ) throws IOException { } @ Override public void close ( ) throws IOException { } @ Override public void flush ( ) throws IOException { } public void print ( final Object value ) throws IOException { } private void print ( final Object object , final CharSequence value , final int offset , final int len ) throws IOException { } private void printAndEscape ( final CharSequence value , final int offset , final int len ) throws IOException { } private void printAndQuote ( final Object object , final CharSequence value , final int offset , final int len ) throws IOException { } public void printComment ( final String comment ) throws IOException { } public void println ( ) throws IOException { } public void printRecord ( final Iterable < ? > values ) throws IOException { } public void printRecord ( final Object ... values ) throws IOException { } public void printRecords ( final Iterable < ? > values ) throws IOException { } public void printRecords ( final Object ... values ) throws IOException { } public void printRecords ( final ResultSet resultSet ) throws IOException , SQLException { ResultSetMetaData metaData = resultSet . getMetaData ( ) ; final int columnCount = metaData . getColumnCount ( ) ; boolean printHeader = false ; if ( printHeader ) { for ( int i = 1 ; i <= columnCount ; i ++ ) { print ( metaData . getColumnLabel ( i ) ) ; } println ( ) ; } while ( resultSet . next ( ) ) { for ( int i = 1 ; i <= columnCount ; i ++ ) { <START_BUG> print ( resultSet . getString ( i ) ) ; <END_BUG> } println ( ) ; } } public Appendable getOut ( ) { } }

Fix:
print ( resultSet . getObject ( i ) ) ;
Buggy code:
public class TestSimulation3 { static Logger2 log = Logger2 . getLogger ( TestSimulation3 . class ) ; List < EventInstanceGenerator > eventGenList = new ArrayList < EventInstanceGenerator > ( 4 ) ; List < Worker > workerList = new ArrayList < Worker > ( ) ; List < Spout > spoutList = new ArrayList < Spout > ( ) ; Coordinator coord = null ; public static void main ( String [ ] args ) { } public void init ( String [ ] args ) throws ConfigurationException { } public void run ( ) throws Exception { String queriesFilePath = "query//queries.txt" ; List < String > queryList = MultiLineFileWriter . readFromFile ( queriesFilePath ) ; System . out . format ( "read<seq2seq4repair_space>%d<seq2seq4repair_space>queries<seq2seq4repair_space>from<seq2seq4repair_space>%s\n" , queryList . size ( ) , queriesFilePath ) ; coord . start ( false ) ; for ( Spout spout : spoutList ) { spout . start ( false ) ; } for ( Worker w : workerList ) { w . start ( false ) ; } TestSimulation3 . sleep ( 5000 ) ; int i = 0 ; try { <START_BUG> for ( i = 0 ; i < 10 ; i ++ ) { <END_BUG> String query = queryList . get ( i ) ; coord . executeEPL ( query ) ; TestSimulation3 . sleep ( 5000 ) ; System . gc ( ) ; } TestSimulation3 . writeGlobalStat ( coord ) ; while ( true ) { TestSimulation3 . sleep ( 10000 ) ; } } catch ( Exception e ) { TestSimulation3 . log . info ( ( "stopped<seq2seq4repair_space>at<seq2seq4repair_space>" + i ) ) ; e . printStackTrace ( ) ; System . exit ( 0 ) ; } } public static void writeGlobalStat ( Coordinator coord ) { } public static void sleep ( long timeMS ) { } }

Fix:
for ( i = 0 ; i < ( queryList . size ( ) ) ; i ++ ) {
Buggy code:
public class Assert { protected Assert ( ) { } public static void assertTrue ( String message , boolean condition ) { } public static void assertTrue ( boolean condition ) { } public static void assertFalse ( String message , boolean condition ) { } public static void assertFalse ( boolean condition ) { } public static void fail ( String message ) { } public static void fail ( ) { } public static void assertEquals ( String message , Object expected , Object actual ) { } public static void assertEquals ( Object expected , Object actual ) { } public static void assertEquals ( String message , double expected , double actual , double delta ) { } public static void assertEquals ( double expected , double actual , double delta ) { } public static void assertEquals ( String message , float expected , float actual , float delta ) { } public static void assertEquals ( float expected , float actual , float delta ) { } public static void assertEquals ( String message , long expected , long actual ) { } public static void assertEquals ( long expected , long actual ) { } public static void assertEquals ( String message , boolean expected , boolean actual ) { } public static void assertEquals ( boolean expected , boolean actual ) { } public static void assertEquals ( String message , byte expected , byte actual ) { } public static void assertEquals ( byte expected , byte actual ) { } public static void assertEquals ( String message , char expected , char actual ) { } public static void assertEquals ( char expected , char actual ) { } public static void assertEquals ( String message , short expected , short actual ) { } public static void assertEquals ( short expected , short actual ) { } public static void assertEquals ( String message , int expected , int actual ) { } public static void assertEquals ( int expected , int actual ) { } public static void assertNotNull ( Object object ) { } public static void assertNotNull ( String message , Object object ) { } public static void assertNull ( Object object ) { } public static void assertNull ( String message , Object object ) { } public static void assertSame ( String message , Object expected , Object actual ) { } public static void assertSame ( Object expected , Object actual ) { } public static void assertNotSame ( String message , Object expected , Object actual ) { } public static void assertNotSame ( Object expected , Object actual ) { } private static void failSame ( String message , Object expected , Object actual ) { } private static void failNotSame ( String message , Object expected , Object actual ) { } private static void failNotEquals ( String message , Object expected , Object actual ) { <START_BUG> throw new ComparisonFailure ( message , ( expected == null ? "null" : expected . toString ( ) ) , ( actual == null ? "null" : actual . toString ( ) ) ) ; <END_BUG> } }

Fix:
throw new ComparisonFailure ( message , expected . toString ( ) , actual . toString ( ) ) ;
Buggy code:
public class SessionAttributeCacheKey { private final String id ; private final String attribute ; public SessionAttributeCacheKey ( String id , String attribute ) { } @ Group public String getId ( ) { } public String getAttribute ( ) { } @ Override public int hashCode ( ) { <START_BUG> return this . id . hashCode ( ) ; <END_BUG> } @ Override public boolean equals ( Object object ) { } @ Override public String toString ( ) { } }

Fix:
return ( this . id . hashCode ( ) ) ^ ( this . attribute . hashCode ( ) ) ;
Buggy code:
@ Controller @ RequestMapping ( "//dataharvest" ) public class DataHarvestController extends BasicController { @ Autowired private PageurlinfoService pageurlinfoService ; @ Autowired private PagedatainfoService pagedatainfoService ; @ Autowired private DataHarvestService dataHarvestService ; double similarityTreshold = 0.8 ; boolean ignoreFormattingTags = false ; boolean useContentSimilarity = false ; int maxNodeInGeneralizedNodes = 9 ; @ RequestMapping ( value = "extract" , method = RequestMethod . GET ) public String extract ( Model model ) { } @ RequestMapping ( value = "extract" , method = RequestMethod . POST ) @ ResponseBody public Message extract ( @ Valid Pageurlinfo pageurlinfo , RedirectAttributes redirectAttributes ) { try { ShiroUser su = super . getLoginUser ( ) ; boolean result = false ; User user = accountService . findUserByLoginName ( su . getLoginName ( ) ) ; if ( user != null ) { try { <START_BUG> Integer . parseInt ( pageurlinfo . getNextScheduleOn ( ) ) ; <END_BUG> } catch ( Exception e ) { pageurlinfo . setJobon ( null ) ; } pageurlinfo . setExtractedDate ( DateTimeUtil . nowTimeStr ( ) ) ; pageurlinfoService . save ( pageurlinfo ) ; if ( pageurlinfo . getElement ( ) . isEmpty ( ) ) { result = dataHarvestService . basicsave ( pageurlinfo ) ; } else { result = dataHarvestService . selectedsave ( pageurlinfo ) ; } msg . setSuccess ( result ) ; msg . setMessage ( "信息添加成功" ) ; msg . setData ( pageurlinfo ) ; } else { logger . log ( this . getClass ( ) , ERROR_INT , "登陆帐号无效!" , "" , null ) ; msg . setSuccess ( false ) ; msg . setMessage ( "登陆帐号无效!" ) ; msg . setData ( "" ) ; } } catch ( Exception ex ) { logger . log ( this . getClass ( ) , ERROR_INT , ex . getMessage ( ) , super . getLoginUser ( ) . getLoginName ( ) , null ) ; msg . setSuccess ( false ) ; msg . setMessage ( ex . getMessage ( ) ) ; msg . setData ( "" ) ; } return msg ; } @ RequestMapping ( value = "saveElement" , method = RequestMethod . POST ) @ ResponseBody public Message saveElement ( @ Valid Pageurlinfo pageurlinfo , RedirectAttributes redirectAttributes ) { } @ RequestMapping ( "extracted" ) @ ResponseBody public Message extracted ( @ Valid Pageurlinfo pageurlinfo , RedirectAttributes redirectAttributes , @ RequestParam ( "id" ) Long id ) { } @ RequestMapping ( "showlog" ) public String showlog ( ) { } @ RequestMapping ( value = "//log" , method = RequestMethod . GET ) public void sendMessage ( Locale locale , HttpServletResponse response ) throws IOException { } @ RequestMapping ( value = "showdata//{id}" , method = RequestMethod . GET ) public String updateForm ( @ PathVariable ( "id" ) Long id , Model model ) { } @ RequestMapping ( value = "delete" , method = RequestMethod . POST ) @ ResponseBody public Message delete ( @ RequestParam ( "tableGroupKeyList" ) List < String > tableGroupKeyList , ServletRequest request ) throws Exception { } }

Fix:
Integer . parseInt ( pageurlinfo . getJobon ( ) ) ;
Buggy code:
public class TestedOnSupplier extends ParameterSupplier { @ Override <START_BUG> public List < PotentialAssignment > getValueSources ( Object test , ParameterSignature sig ) { <END_BUG> List < PotentialAssignment > list = new ArrayList < PotentialAssignment > ( ) ; TestedOn testedOn = sig . getAnnotation ( TestedOn . class ) ; int [ ] ints = testedOn . ints ( ) ; for ( final int i : ints ) { list . add ( PotentialAssignment . forValue ( i ) ) ; } return list ; } }

Fix:
public List < PotentialAssignment > getValueSources ( ParameterSignature sig ) {
Buggy code:
public class ViewProfileFrag extends Fragment { private static final String ARG_PARAM1 = "param1" ; private static final String ARG_PARAM2 = "param2" ; private String mParam1 ; private String mParam2 ; private TextView fnameText ; private TextView emailText ; private TextView locText ; private TextView stateText ; private TextView bioText ; private FriendObject info ; private ArrayList < FriendObject > localities = new ArrayList < FriendObject > ( ) ; private ViewProfileFrag . OnFragmentInteractionListener mListener ; public ViewProfileFrag ( ) { } public static ViewProfileFrag newInstance ( String param1 , String param2 ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View view = inflater . inflate ( fragment_view_profile , container , false ) ; localities = this . getArguments ( ) . getParcelableArrayList ( "myData" ) ; int i = this . getArguments ( ) . getInt ( "index" ) ; fnameText = ( ( TextView ) ( view . findViewById ( friendNameText ) ) ) ; emailText = ( ( TextView ) ( view . findViewById ( friendEmailText ) ) ) ; locText = ( ( TextView ) ( view . findViewById ( friendLocationText ) ) ) ; stateText = ( ( TextView ) ( view . findViewById ( friendStatusText ) ) ) ; bioText = ( ( TextView ) ( view . findViewById ( friendBioText ) ) ) ; info = localities . get ( i ) ; <START_BUG> fnameText . setText ( ( ( info . getFname ( ) ) + ( info . getLname ( ) ) ) ) ; <END_BUG> locText . setText ( ( "Location:" + ( info . getLocname ( ) ) ) ) ; emailText . setText ( info . getEmail ( ) ) ; stateText . setText ( ( "Status:" + ( info . getStatus ( ) ) ) ) ; bioText . setText ( info . getBio ( ) ) ; return view ; } public void onButtonPressed ( Uri uri ) { } @ Override public void onAttach ( Context context ) { } @ Override public void onDetach ( ) { } public interface OnFragmentInteractionListener { void onFragmentInteraction ( Uri uri ) { } } }

Fix:
fnameText . setText ( ( ( ( info . getFname ( ) ) + "<seq2seq4repair_space>" ) + ( info . getLname ( ) ) ) ) ;
Buggy code:
class StyledTextTab extends ScrollableTab { StyledText styledText ; Group styledTextGroup ; Group styledTextStyleGroup ; Button wrapButton ; Button readOnlyButton ; Button fullSelectionButton ; Button boldButton ; Button italicButton ; Button redButton ; Button yellowButton ; Button underlineButton ; Button strikeoutButton ; Image boldImage ; Image italicImage ; Image redImage ; Image yellowImage ; Image underlineImage ; Image strikeoutImage ; StyleRange [ ] styleRanges ; StyledTextTab ( ControlExample instance ) { } Image createBitmapImage ( Display display , String name ) { } void createControlWidgets ( ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } void createStyledTextStyleGroup ( ) { } Composite createTabFolderPage ( TabFolder tabFolder ) { } void disposeExampleWidgets ( ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { <START_BUG> return new String [ ] { "CaretOffset" , "DoubleClickEnabled" , "Editable" , "HorizontalIndex" , "HorizontalPixel" , "Orientation" , "Selection" , "Tabs" , "Text" , "TextLimit" , "TopIndex" , "TopPixel" , "WordWrap" } ; <END_BUG> } String getTabText ( ) { } void setExampleWidgetState ( ) { } }

Fix:
return new String [ ] { "CaretOffset" , "DoubleClickEnabled" , "Editable" , "HorizontalIndex" , "HorizontalPixel" , "Orientation" , "Selection" , "Tabs" , "Text" , "TextLimit" , "ToolTipText" , "TopIndex" , "TopPixel" , "WordWrap" } ;
Buggy code:
public class ScopeWithTypeVariables implements IScope { private IScope delegateScope ; private TypeVariablePatternList typeVariables ; public ScopeWithTypeVariables ( TypeVariablePatternList typeVars , IScope delegate ) { } public TypeX lookupType ( String name , IHasPosition location ) { <START_BUG> TypeVariable typeVariableMatch = typeVariables . lookupTypeVariable ( name ) ; <END_BUG> if ( typeVariableMatch != null ) { return typeVariableMatch . resolvedType ( ) ; } else { return delegateScope . lookupType ( name , location ) ; } } public World getWorld ( ) { } public ResolvedTypeX getEnclosingType ( ) { } public IMessageHandler getMessageHandler ( ) { } public FormalBinding lookupFormal ( String name ) { } public FormalBinding getFormal ( int i ) { } public int getFormalCount ( ) { } public String [ ] getImportedPrefixes ( ) { } public String [ ] getImportedNames ( ) { } public void message ( Kind kind , IHasPosition location , String message ) { } public void message ( Kind kind , IHasPosition location1 , IHasPosition location2 , String message ) { } }

Fix:
TypeVariablePattern typeVariableMatch = typeVariables . lookupTypeVariable ( name ) ;
Buggy code:
public class AssistSourceType extends ResolvedSourceType { private Map bindingCache ; private Map infoCache ; private String uniqueKey ; public AssistSourceType ( JavaElement parent , String name , Map bindingCache , Map infoCache ) { } public Object getElementInfo ( IProgressMonitor monitor ) throws JavaModelException { } public String getFullyQualifiedParameterizedName ( ) throws JavaModelException { if ( this . isResolved ( ) ) { <START_BUG> return getFullyQualifiedParameterizedName ( getFullyQualifiedName ( ) , this . getKey ( ) ) ; <END_BUG> } return getFullyQualifiedName ( '.' , true ) ; } public String getKey ( ) { } public boolean isResolved ( ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { } public IAnnotation getAnnotation ( String annotationName ) { } public IField getField ( String fieldName ) { } public IInitializer getInitializer ( int count ) { } public IMethod getMethod ( String selector , String [ ] parameterTypeSignatures ) { } public IType getType ( String typeName ) { } public IType getType ( String typeName , int count ) { } public ITypeParameter getTypeParameter ( String typeParameterName ) { } }

Fix:
return getFullyQualifiedParameterizedName ( getFullyQualifiedName ( '.' ) , this . getKey ( ) ) ;
Buggy code:
public class TestFieldCacheRangeFilter extends BaseTestRangeFilter { @ Test public void testRangeFilterId ( ) throws IOException { } @ Test public void testFieldCacheRangeFilterRand ( ) throws IOException { } @ Test public void testFieldCacheRangeFilterInts ( ) throws IOException { } @ Test public void testFieldCacheRangeFilterLongs ( ) throws IOException { } @ Test public void testFieldCacheRangeFilterFloats ( ) throws IOException { } @ Test public void testFieldCacheRangeFilterDoubles ( ) throws IOException { } @ Test public void testSparseIndex ( ) throws IOException { Directory dir = newDirectory ( ) ; IndexWriter writer = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) ) ; for ( int d = - 20 ; d <= 20 ; d ++ ) { Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . IntField ( "id_int" , d , Store . NO ) ) ; doc . add ( newStringField ( "body" , "body" , NO ) ) ; writer . addDocument ( doc ) ; } writer . forceMerge ( 1 ) ; BytesRef term0 = new BytesRef ( ) ; NumericUtils . intToPrefixCoded ( 0 , 0 , term0 ) ; writer . deleteDocuments ( new Term ( "id_int" , term0 ) ) ; <START_BUG> writer . close ( ) ; <END_BUG> IndexReader reader = DirectoryReader . open ( dir ) ; IndexSearcher search = newSearcher ( reader ) ; assertTrue ( reader . hasDeletions ( ) ) ; ScoreDoc [ ] result ; Query q = new TermQuery ( new Term ( "body" , "body" ) ) ; result = search . search ( q , FieldCacheRangeFilter . newIntRange ( "id_int" , ( - 20 ) , 20 , T , T ) , 100 ) . scoreDocs ; assertEquals ( "find<seq2seq4repair_space>all" , 40 , result . length ) ; result = search . search ( q , FieldCacheRangeFilter . newIntRange ( "id_int" , 0 , 20 , T , T ) , 100 ) . scoreDocs ; assertEquals ( "find<seq2seq4repair_space>all" , 20 , result . length ) ; result = search . search ( q , FieldCacheRangeFilter . newIntRange ( "id_int" , ( - 20 ) , 0 , T , T ) , 100 ) . scoreDocs ; assertEquals ( "find<seq2seq4repair_space>all" , 20 , result . length ) ; result = search . search ( q , FieldCacheRangeFilter . newIntRange ( "id_int" , 10 , 20 , T , T ) , 100 ) . scoreDocs ; assertEquals ( "find<seq2seq4repair_space>all" , 11 , result . length ) ; result = search . search ( q , FieldCacheRangeFilter . newIntRange ( "id_int" , ( - 20 ) , ( - 10 ) , T , T ) , 100 ) . scoreDocs ; assertEquals ( "find<seq2seq4repair_space>all" , 11 , result . length ) ; reader . close ( ) ; dir . close ( ) ; } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class TestEnemyStatPredicate extends TestStatPredicate { private int enemyId ; public TestEnemyStatPredicate ( Element element ) { } @ Override protected AbstractEntityState getEntityStateToTest ( GameState gameState ) { } @ Override protected int getAttackStrength ( GameState gameState ) { <START_BUG> return gameState . getBattleState ( ) . getCurrentAttackStrengths ( ) . getEnemyAttackStrength ( enemyId ) ; <END_BUG> } }

Fix:
return gameState . getBattleState ( ) . getCurrentAttackStrengths ( ) . getEnemyAttackStrength ( enemyId ) . getTotal ( ) ;
Buggy code:
public abstract class AbstractDataGridView extends DataViewBase { private static final long serialVersionUID = 1L ; private static final String CELL_REPEATER_ID = "cells" ; private static final String CELL_ITEM_ID = "cell" ; private ICellPopulator [ ] populators ; private transient ArrayIteratorAdapter populatorsIteratorCache ; public AbstractDataGridView ( String id , ICellPopulator [ ] populators , IDataProvider dataProvider ) { } private Iterator getPopulatorsIterator ( ) { } protected final void populateItem ( Item item ) { final IModel rowModel = item . getModel ( ) ; item . add ( new RefreshingView ( AbstractDataGridView . CELL_REPEATER_ID ) { private static final long serialVersionUID = 1L ; protected Iterator getItemModels ( ) { return getPopulatorsIterator ( ) ; } protected void populateItem ( Item item ) { final ICellPopulator populator = ( ( ICellPopulator ) ( item . getModelObject ( ) ) ) ; populator . populateItem ( item , AbstractDataGridView . CELL_ITEM_ID , rowModel ) ; if ( ( item . get ( "cell" ) ) == null ) { <START_BUG> throw new wicket . WicketRuntimeException ( ( ( ( ( populator . getClass ( ) . getName ( ) ) + ".populateItem()<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>a<seq2seq4repair_space>component<seq2seq4repair_space>with<seq2seq4repair_space>id<seq2seq4repair_space>[" ) + ( AbstractDataGridView . CELL_ITEM_ID ) ) + "]<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>provided<seq2seq4repair_space>[cellItem]<seq2seq4repair_space>argument" ) ) ; <END_BUG> } } protected Item newItem ( String id , int index , IModel model ) { return newCellItem ( id , index , model ) ; } } ) ; } protected final ICellPopulator [ ] internalGetPopulators ( ) { } protected final Item newItem ( String id , int index , IModel model ) { } protected Item newRowItem ( final String id , int index , final IModel model ) { } protected Item newCellItem ( final String id , int index , final IModel model ) { } }

Fix:
throw new wicket . WicketRuntimeException ( ( ( ( ( populator . getClass ( ) . getName ( ) ) + ".populateItem()<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>a<seq2seq4repair_space>component<seq2seq4repair_space>with<seq2seq4repair_space>id<seq2seq4repair_space>[" ) + ( AbstractDataGridView . CELL_ITEM_ID ) ) + "]<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>provided<seq2seq4repair_space>[cellItem]<seq2seq4repair_space>object.<seq2seq4repair_space>Make<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>call<seq2seq4repair_space>add()<seq2seq4repair_space>on<seq2seq4repair_space>cellItem<seq2seq4repair_space>(<seq2seq4repair_space>cellItem.add(new<seq2seq4repair_space>MyComponent(componentId,<seq2seq4repair_space>rowModel)<seq2seq4repair_space>)" ) ) ;
Buggy code:
public final class ValidationProcessorTest { private static final String K1 = "k1" ; private static final ObjectNode RAWSCHEMA ; private static final ArrayNode RAWINSTANCE ; private static final AtomicInteger COUNT = new AtomicInteger ( 0 ) ; private Processor < FullData , FullData > processor ; @ BeforeMethod public void init ( ) { } @ Test public void childrenAreNotExploredByDefaultIfContainerFails ( ) throws ProcessingException { } @ Test public void childrenAreExploredOnDemandEvenIfContainerFails ( ) throws ProcessingException { } @ Test ( timeOut = 1000 ) public void circularReferencingDuringValidationIsDetected ( ) throws ProcessingException , IOException { final JsonNode schemaNode = JsonLoader . fromResource ( "//other//issue102.json" ) ; final JsonSchemaFactory factory = JsonSchemaFactory . byDefault ( ) ; final JsonValidator validator = factory . getValidator ( ) ; final MessageBundle bundle = MessageBundles . getBundle ( JsonSchemaValidationBundle . class ) ; final String expectedMsg = bundle . getMessage ( "err.common.validationLoop" ) ; try { validator . validate ( schemaNode , JacksonUtils . nodeFactory ( ) . nullNode ( ) ) ; fail ( "No<seq2seq4repair_space>exception<seq2seq4repair_space>thrown!" ) ; } catch ( ProcessingException e ) { <START_BUG> assertEquals ( e . getMessage ( ) , expectedMsg ) ; <END_BUG> } assertTrue ( true ) ; } public static final class K1Validator extends AbstractKeywordValidator { public K1Validator ( final JsonNode digest ) { } @ Override public void validate ( final Processor < FullData , FullData > processor , final ProcessingReport report , final MessageBundle bundle , final FullData data ) throws ProcessingException { } @ Override public String toString ( ) { } } }

Fix:
assertEquals ( e . getProcessingMessage ( ) . getMessage ( ) , expectedMsg ) ;
Buggy code:
public abstract class AbstractMockPredicateTest < T > { private List < Predicate < ? super T > > mockPredicatesToVerify ; private final T testValue ; protected AbstractMockPredicateTest ( final T testValue ) { } @ Before public final void createVerifyList ( ) { } @ After public final void verifyPredicates ( ) { <START_BUG> for ( Predicate < ? super T > predicate : mockPredicatesToVerify ) { <END_BUG> verify ( predicate ) ; } } protected final T getTestValue ( ) { } @ SuppressWarnings ( { "unchecked" , "boxing" } ) protected final Predicate < T > createMockPredicate ( final Boolean returnValue ) { } }

Fix:
for ( final Predicate < ? super T > predicate : mockPredicatesToVerify ) {