nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ConcatTest extends BuildFileTest { private static final String tempFile = "concat.tmp" ; private static final String tempFile2 = "concat.tmp.2" ; public ConcatTest ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { } public void test1 ( ) { } public void test2 ( ) { } public void test3 ( ) { } public void test4 ( ) { } public void test5 ( ) { } public void test6 ( ) { } public void testConcatNoNewline ( ) { } public void testConcatNoNewlineEncoding ( ) { } public void testPath ( ) { } public void testAppend ( ) { } public void testFilter ( ) { } public void testNoOverwrite ( ) { } public void testheaderfooter ( ) { } public void testfileheader ( ) { } public void testsame ( ) { } public void testfilterinline ( ) { } public void testmultireader ( ) { } public void testfixlastline ( ) throws IOException { } public void testfixlastlineeol ( ) throws IOException { } private String getFileString ( String filename ) throws IOException { Reader r = null ; try { r = new FileReader ( getProject ( ) . resolveFile ( filename ) ) ; <START_BUG> return FileUtils . newFileUtils ( ) . readFully ( r ) ; <END_BUG> } finally { try { r . close ( ) ; } catch ( Throwable ignore ) { } } } private String getFileString ( String target , String filename ) throws IOException { } private void expectFileContains ( String target , String filename , String contains ) throws IOException { } public void testTranscoding ( ) throws IOException { } }

Fix:
return FileUtils . readFully ( r ) ;
Buggy code:
public class RightJustifyAction extends CheckBoxAction implements ContainerListener , Observer { public RightJustifyAction ( FrameMediator frameMediator ) { } public void update ( Observable arg0 , Object arg1 ) { } public void actionPerformed ( ActionEvent evt ) { } public void componentAdded ( ContainerEvent e ) { <START_BUG> log . debug ( "Re-registering<seq2seq4repair_space>as<seq2seq4repair_space>observer<seq2seq4repair_space>on<seq2seq4repair_space>editor<seq2seq4repair_space>controller" ) ; <END_BUG> ( ( org . columba . mail . gui . composer . ComposerController ) ( getFrameMediator ( ) ) ) . getEditorController ( ) . addObserver ( this ) ; } public void componentRemoved ( ContainerEvent e ) { } }

Fix:
log . info ( "Re-registering<seq2seq4repair_space>as<seq2seq4repair_space>observer<seq2seq4repair_space>on<seq2seq4repair_space>editor<seq2seq4repair_space>controller" ) ;
Buggy code:
public class RaServicesFactory { public static void createDeploymentService ( final ManagementResourceRegistration registration , ConnectorXmlDescriptor connectorXmlDescriptor , Module module , ServiceTarget serviceTarget , final String deploymentUnitName , String deployment , ResourceAdapter raxml , final Resource deploymentResource ) { <START_BUG> ServiceName serviceName = ConnectorServices . registerDeployment ( raxml . getArchive ( ) ) ; <END_BUG> ResourceAdapterXmlDeploymentService service = new ResourceAdapterXmlDeploymentService ( connectorXmlDescriptor , raxml , module , deployment , serviceName ) ; ServiceBuilder builder = serviceTarget . addService ( serviceName , service ) . addDependency ( IRONJACAMAR_MDR , AS7MetadataRepository . class , service . getMdrInjector ( ) ) . addDependency ( RA_REPOSITORY_SERVICE , ResourceAdapterRepository . class , service . getRaRepositoryInjector ( ) ) . addDependency ( MANAGEMENT_REPOSITORY_SERVICE , ManagementRepository . class , service . getManagementRepositoryInjector ( ) ) . addDependency ( RESOURCE_ADAPTER_REGISTRY_SERVICE , ResourceAdapterDeploymentRegistry . class , service . getRegistryInjector ( ) ) . addDependency ( TRANSACTION_INTEGRATION_SERVICE , TransactionIntegration . class , service . getTxIntegrationInjector ( ) ) . addDependency ( CONNECTOR_CONFIG_SERVICE , JcaSubsystemConfiguration . class , service . getConfigInjector ( ) ) . addDependency ( SERVICE_NAME , SubjectFactory . class , service . getSubjectFactoryInjector ( ) ) . addDependency ( CCM_SERVICE , CachedConnectionManager . class , service . getCcmInjector ( ) ) . addDependency ( IDLE_REMOVER_SERVICE ) . addDependency ( CONNECTION_VALIDATOR_SERVICE ) . addDependency ( NamingService . SERVICE_NAME ) . addDependency ( RESOURCE_ADAPTER_DEPLOYER_SERVICE_PREFIX . append ( connectorXmlDescriptor . getDeploymentName ( ) ) ) ; builder . addListener ( new AbstractResourceAdapterDeploymentServiceListener ( registration , deploymentUnitName , deploymentResource ) { @ Override protected void registerIronjacamar ( ServiceController < ? extends Object > controller , ManagementResourceRegistration subRegistration , Resource subsystemResource ) { } @ Override protected CommonDeployment getDeploymentMetadata ( final ServiceController < ? extends Object > controller ) { return ( ( ResourceAdapterXmlDeploymentService ) ( controller . getService ( ) ) ) . getRaxmlDeployment ( ) ; } } ) ; builder . setInitialMode ( ACTIVE ) . install ( ) ; } }

Fix:
ServiceName serviceName = ConnectorServices . registerDeployment ( deploymentUnitName ) ;
Buggy code:
public class ManagementClientManualTestCase { private ManagementClient client ; private ArchiveDeployer deployer ; @ Test public void shouldBeAbleToGetDomain ( ) throws Exception { } @ Test public void shouldBeAbleToReadMetadata ( ) throws Exception { } public void shouldbeAbleToStopAndStartServerGroup ( ) throws Exception { } @ Test public void shouldbeAbleToStpAndStartServer ( ) throws Exception { } @ Before public void createClient ( ) throws Exception { InetAddress address = InetAddress . getLocalHost ( ) ; <START_BUG> int port = 9999 ; <END_BUG> DomainClient domainClient = Factory . create ( address , port , Authentication . getCallbackHandler ( ) ) ; client = new ManagementClient ( domainClient , address . getHostAddress ( ) , port ) ; deployer = new ArchiveDeployer ( domainClient . getDeploymentManager ( ) ) ; } @ After public void closeClient ( ) throws Exception { } }

Fix:
int port = 9990 ;
Buggy code:
public class SortableSemanticModel extends SemanticModel implements Comparable < SortableSemanticModel > { private double cost ; private SteinerNodes steinerNodes ; private Coherence linkCoherence ; public SortableSemanticModel ( SemanticModel semanticModel , SteinerNodes steinerNodes ) { } public SortableSemanticModel ( SemanticModel semanticModel ) { } public SemanticModel getBaseModel ( ) { } public double getCost ( ) { } public double getConfidenceScore ( ) { <START_BUG> return this . steinerNodes . getConfidence ( ) . getConfidenceValue ( ) ; <END_BUG> } public SteinerNodes getSteinerNodes ( ) { } public Coherence getLinkCoherence ( ) { } private double computeCost ( ) { } private void computeCoherence ( ) { } @ Override public int compareTo ( SortableSemanticModel m ) { } }

Fix:
return ( this . steinerNodes . getConfidence ( ) ) == null ? 0.0 : this . steinerNodes . getConfidence ( ) . getConfidenceValue ( ) ;
Buggy code:
public class ClassAvailableCondition extends AbstractAvailableCondition implements Condition { private String m_classname ; public void setClassname ( final String classname ) { } public boolean evaluate ( final TaskContext context ) throws TaskException { if ( ( m_classname ) == null ) { throw new TaskException ( "Classname<seq2seq4repair_space>not<seq2seq4repair_space>specified." ) ; } <START_BUG> final ClassLoader classLoader = buildClassLoader ( ) ; <END_BUG> try { classLoader . loadClass ( m_classname ) ; return true ; } catch ( final Exception e ) { return false ; } } }

Fix:
final ClassLoader classLoader = buildClassLoader ( context ) ;
Buggy code:
public class GameGuiMethodsTest { private GameGuiMethods g ; @ Before public final void start ( ) { Game game = new Game ( ) ; game . start ( ) ; <START_BUG> g = new GameGuiMethods ( game ) ; <END_BUG> } @ Test public final void testProcessClick ( ) { } @ Test ( expected = IndexOutOfBoundsException . class ) public final void testgetSelectedCoordsToBig ( ) { } @ Test ( expected = IndexOutOfBoundsException . class ) public final void testgetSelectedCoordsNegative ( ) { } }

Fix:
g = GameGuiMethods . getInstance ( ) ;
Buggy code:
public class RoomGeoSmart extends Room { private static final long serialVersionUID = 2452728543226021893L ; private Polygon polygon100Big = new Polygon ( ) ; private ProfileShape3D polygon100BigShape3D ; public RoomGeoSmart ( List < Vector3D > points ) { } public RoomGeoSmart ( Shape3D shape3D ) { } public RoomGeoSmart ( Area alreadyBigArea ) { } public RoomGeoSmart ( Polygon polygonBig100 ) { } public RoomGeoSmart ( Vector3D pointCenterOfSmallRoom ) { } public RoomGeoSmart ( Segment3D seg1 ) { } public RoomGeoSmart ( Room r ) { } public RoomGeoSmart ( float [ ] [ ] points ) { } public void addPointToPolygonAndToShape ( float x , float y ) { } public Rectangle3D getBoundingRoomRect3D ( ) { } private Rectangle3D getBoundingBox ( ) { } private Rectangle3D getRectangleFromPoints ( ) { } public RoomGeoSmart getBiggerRoomBordered ( float borderSize ) { } public RoomGeoSmart getBiggerCopyMultiplied ( float scaleFactor ) { } public boolean intersect ( RoomGeoSmart r2 ) { } public boolean containsPoint ( Vector3D point ) { } private Area getAreaShape100Big ( ) { } private boolean intersect ( RoomGeoSmart r2 , RoomGeoSmart . intersectionAlgorithm algo ) { } private void addAllPoints ( float [ ] [ ] points ) { } private void addPointToShape ( int x , int y ) { } private boolean areaIntersect ( Polygon p1 , Polygon p2 ) { } private boolean pointsIntersect ( Polygon p1 , Polygon p2 ) { } @ Override public String toString ( ) { <START_BUG> String s = "" ; <END_BUG> float [ ] [ ] points = this . getPoints ( ) ; for ( int i = 0 ; i < ( points . length ) ; i ++ ) { s = ( ( ( ( ( s + "(" ) + ( points [ i ] [ 0 ] ) ) + ",<seq2seq4repair_space>" ) + ( points [ i ] [ 1 ] ) ) + ")" ) + "\n" ; } return s ; } public Vector3D getCentroid100Big ( ) { } public Vector3D getCentroidRegular ( ) { } private enum intersectionAlgorithm { INNER_POINTS , AREA ; } private static List < Vector3D > polygonToList ( Polygon polygon ) { } private static List < Vector3D > areaToPointList ( Area alreadyBigArea ) { } private static Vector3D describeCurrentSegment ( PathIterator pi ) { } public RoomGeoSmart intersectionAreaRoom ( RoomGeoSmart room2 ) { } private static float [ ] [ ] getFloatArrayAroundSegment ( Segment3D seg1 ) { } private static float [ ] [ ] getFloatArrayAroundPoint ( Vector3D pointCenterOfSmallRoom ) { } public boolean isTheWallSeparating ( RoomGeoSmart r2 , RoomGeoSmart wall ) { } private boolean isInside ( Vector3D point , Rectangle3D rectWall , Area a1 , Area a2 ) { } }

Fix:
String s = ( ( "" + ( this . getName ( ) ) ) != null ) ? this . getName ( ) : "" ;
Buggy code:
public class MessagePanel extends JPanel implements Scrollable { public Dimension getPreferredScrollableViewportSize ( ) { } public int getScrollableUnitIncrement ( Rectangle arg0 , int arg1 , int arg2 ) { Font textFont = Config . getOptionsConfig ( ) . getGuiItem ( ) . getTextFont ( ) ; <START_BUG> return ( textFont . getSize ( ) ) * 5 ; <END_BUG> } public int getScrollableBlockIncrement ( Rectangle arg0 , int arg1 , int arg2 ) { } public boolean getScrollableTracksViewportWidth ( ) { } public boolean getScrollableTracksViewportHeight ( ) { } }

Fix:
return ( textFont . getSize ( ) ) * 3 ;
Buggy code:
public class SelectionOnLocalName extends LocalDeclaration { public SelectionOnLocalName ( char [ ] name , int sourceStart , int sourceEnd ) { } public void resolve ( BlockScope scope ) { super . resolve ( scope ) ; <START_BUG> throw new SelectionNodeFound ( binding ) ; <END_BUG> } public StringBuffer printStatement ( int tab , StringBuffer output ) { } }

Fix:
throw new SelectionNodeFound ( this , binding ) ;
Buggy code:
public abstract class AbstractDefaultAjaxBehavior extends AbstractAjaxBehavior { private static final long serialVersionUID = 1L ; public static final ResourceReference INDICATOR = new ResourceReference ( AbstractDefaultAjaxBehavior . class , "indicator.gif" ) ; private static final ResourceReference JAVASCRIPT = new JavascriptResourceReference ( AbstractDefaultAjaxBehavior . class , "wicket-ajax.js" ) ; private static final ResourceReference JAVASCRIPT_DEBUG = new JavascriptResourceReference ( AbstractDefaultAjaxBehavior . class , "wicket-ajax-debug.js" ) ; protected void onBind ( ) { } public void renderHead ( IHeaderResponse response ) { } protected IAjaxCallDecorator getAjaxCallDecorator ( ) { } protected CharSequence getCallbackScript ( ) { } protected CharSequence getCallbackScript ( boolean onlyTargetActivePage ) { } protected CharSequence getCallbackScript ( final CharSequence partialCall , final CharSequence onSuccessScript , final CharSequence onFailureScript ) { final IAjaxCallDecorator decorator = getAjaxCallDecorator ( ) ; String indicatorId = findIndicatorId ( ) ; CharSequence success = ( onSuccessScript == null ) ? "" : onSuccessScript ; CharSequence failure = ( onFailureScript == null ) ? "" : onFailureScript ; if ( decorator != null ) { success = decorator . decorateOnSuccessScript ( success ) ; } if ( ! ( Strings . isEmpty ( indicatorId ) ) ) { String hide = ( ";wicketHide('" + indicatorId ) + "');" ; success = success + hide ; failure = failure + hide ; } if ( decorator != null ) { failure = decorator . decorateOnFailureScript ( failure ) ; } AppendingStringBuffer buff = new AppendingStringBuffer ( 256 ) ; buff . append ( "var<seq2seq4repair_space>" ) . append ( WICKET_CALL_RESULT_VAR ) . append ( "=" ) ; buff . append ( partialCall ) . append ( ",<seq2seq4repair_space>function()<seq2seq4repair_space>{<seq2seq4repair_space>" ) . append ( success ) ; <START_BUG> buff . append ( "},<seq2seq4repair_space>function()<seq2seq4repair_space>{<seq2seq4repair_space>" ) . append ( failure ) . append ( "});" ) ; <END_BUG> CharSequence call = buff ; if ( ! ( Strings . isEmpty ( indicatorId ) ) ) { call = new AppendingStringBuffer ( "wicketShow('" ) . append ( indicatorId ) . append ( "');" ) . append ( call ) ; } if ( decorator != null ) { call = decorator . decorateScript ( call ) ; } return call ; } private String findIndicatorId ( ) { } public final void onRequest ( ) { } protected abstract void respond ( AjaxRequestTarget target ) { } public static final CharSequence throttleScript ( CharSequence script , String throttleId , Duration throttleDelay ) { } }

Fix:
buff . append ( "}.bind(this),<seq2seq4repair_space>function()<seq2seq4repair_space>{<seq2seq4repair_space>" ) . append ( failure ) . append ( "}.bind(this));" ) ;
Buggy code:
public interface IActivityRegistryListener { <START_BUG> void activityRegistryChanged ( IActivityRegistryEvent activityRegistryEvent ) ; <END_BUG> }

Fix:
void activityRegistryChanged ( ActivityRegistryEvent activityRegistryEvent ) ;
Buggy code:
public class Ant extends Task { private File dir = null ; private String antFile = null ; private String target = null ; private String output = null ; Vector properties = new Vector ( ) ; Project p1 ; public void init ( ) { p1 = new Project ( ) ; <START_BUG> p1 . detectJavaVersion ( ) ; <END_BUG> p1 . addTaskDefinition ( "property" , ( ( Class ) ( project . getTaskDefinitions ( ) . get ( "property" ) ) ) ) ; } private void reinit ( ) { } private void initializeProject ( ) { } public void execute ( ) throws BuildException { } public void setDir ( File d ) { } public void setAntfile ( String s ) { } public void setTarget ( String s ) { } public void setOutput ( String s ) { } public Property createProperty ( ) { } }

Fix:
p1 . setJavaVersionProperty ( ) ;
Buggy code:
public class FilterPostProcessor implements Savable , SceneProcessor { private RenderManager renderManager ; private Renderer renderer ; private ViewPort viewPort ; private FrameBuffer renderFrameBufferMS ; private int numSamples = 1 ; private FrameBuffer renderFrameBuffer ; private Texture2D filterTexture ; private Texture2D depthTexture ; private SafeArrayList < Filter > filters = new SafeArrayList < Filter > ( Filter . class ) ; private AssetManager assetManager ; private Picture fsQuad ; private boolean computeDepth = false ; private FrameBuffer outputBuffer ; private int width ; private int height ; private float bottom ; private float left ; private float right ; private float top ; private int originalWidth ; private int originalHeight ; private int lastFilterIndex = - 1 ; private boolean cameraInit = false ; private boolean multiView = false ; private Format fbFormat = Format . RGB111110F ; public FilterPostProcessor ( AssetManager assetManager ) { } public FilterPostProcessor ( ) { } public void addFilter ( Filter filter ) { } public void removeFilter ( Filter filter ) { } public Iterator < Filter > getFilterIterator ( ) { } public void initialize ( RenderManager rm , ViewPort vp ) { } private void initFilter ( Filter filter , ViewPort vp ) { } private void renderProcessing ( Renderer r , FrameBuffer buff , Material mat ) { } public boolean isInitialized ( ) { } public void postQueue ( RenderQueue rq ) { } private void renderFilterChain ( Renderer r , FrameBuffer sceneFb ) { } public void postFrame ( FrameBuffer out ) { FrameBuffer sceneBuffer = renderFrameBuffer ; if ( ( ( renderFrameBufferMS ) != null ) && ( ! ( renderer . getCaps ( ) . contains ( OpenGL31 ) ) ) ) { <START_BUG> renderer . copyFrameBuffer ( renderFrameBufferMS , renderFrameBuffer ) ; <END_BUG> } else if ( ( renderFrameBufferMS ) != null ) { sceneBuffer = renderFrameBufferMS ; } renderFilterChain ( renderer , sceneBuffer ) ; renderer . setFrameBuffer ( outputBuffer ) ; if ( ( viewPort ) != null ) { renderManager . setCamera ( viewPort . getCamera ( ) , false ) ; } } public void preFrame ( float tpf ) { } protected void setFilterState ( Filter filter , boolean enabled ) { } private void updateLastFilterIndex ( ) { } public void cleanup ( ) { } public void reshape ( ViewPort vp , int w , int h ) { } public int getNumSamples ( ) { } public void removeAllFilters ( ) { } public void setNumSamples ( int numSamples ) { } public void setAssetManager ( AssetManager assetManager ) { } public void write ( JmeExporter ex ) throws IOException { } public void read ( JmeImporter im ) throws IOException { } public Texture2D getDepthTexture ( ) { } public Texture2D getFilterTexture ( ) { } public < T extends Filter > T getFilter ( Class < T > filterType ) { } public List < Filter > getFilterList ( ) { } private void setupViewPortFrameBuffer ( ) { } }

Fix:
renderer . copyFrameBuffer ( renderFrameBufferMS , renderFrameBuffer , true ) ;
Buggy code:
public class LuaDebugDataProcessor implements Processor , ElementVisitor < Void , LuaMethodDebugInformation > { private HashMap < String , LuaClassDebugInformation > classes ; private Filer filer ; public Iterable < ? extends Completion > getCompletions ( Element arg0 , AnnotationMirror arg1 , ExecutableElement arg2 , String arg3 ) { } public Set < String > getSupportedAnnotationTypes ( ) { } public Set < String > getSupportedOptions ( ) { } public SourceVersion getSupportedSourceVersion ( ) { } public void init ( ProcessingEnvironment arg0 ) { } public boolean process ( Set < ? extends TypeElement > arg0 , RoundEnvironment arg1 ) { } public Void visit ( Element arg0 ) { } public Void visit ( Element arg0 , LuaMethodDebugInformation arg1 ) { } public Void visitExecutable ( ExecutableElement element , LuaMethodDebugInformation arg1 ) { } private LuaClassDebugInformation getOrCreate ( HashMap < String , LuaClassDebugInformation > classes , String className , String packageName , String simpleClassName ) { } private String findClass ( Element arg0 ) { } private String findSimpleClassName ( Element arg0 ) { } private String findPackage ( Element arg0 ) { } public Void visitPackage ( PackageElement arg0 , LuaMethodDebugInformation arg1 ) { } public Void visitType ( TypeElement arg0 , LuaMethodDebugInformation arg1 ) { } public Void visitTypeParameter ( TypeParameterElement arg0 , LuaMethodDebugInformation arg1 ) { } public Void visitUnknown ( Element arg0 , LuaMethodDebugInformation arg1 ) { } public Void visitVariable ( VariableElement arg0 , LuaMethodDebugInformation arg1 ) { String type = arg0 . asType ( ) . toString ( ) ; String name = arg0 . getSimpleName ( ) . toString ( ) ; String desc = null ; List < ? extends AnnotationMirror > mirrors = arg0 . getAnnotationMirrors ( ) ; for ( AnnotationMirror mirror : mirrors ) { if ( mirror . getAnnotationType ( ) . toString ( ) . equals ( Desc . class . getName ( ) ) ) { Map < ? extends ExecutableElement , ? extends AnnotationValue > values = mirror . getElementValues ( ) ; Set < ? extends ExecutableElement > name2 = values . keySet ( ) ; Iterator < ? extends ExecutableElement > iterator = name2 . iterator ( ) ; while ( iterator . hasNext ( ) ) { ExecutableElement element2 = iterator . next ( ) ; AnnotationValue value = values . get ( element2 ) ; desc = value . getValue ( ) . toString ( ) ; } } } <START_BUG> if ( ( type . equals ( ReturnValues . class . getName ( ) ) ) && ( ( arg1 . parameterNames . size ( ) ) == 0 ) ) { <END_BUG> arg1 . returnDescription = desc ; arg1 . returnType = "multiple<seq2seq4repair_space>values" ; } else { arg1 . parameterNames . add ( name ) ; arg1 . parameterTypes . add ( type ) ; arg1 . parameterDescriptions . add ( desc ) ; } return null ; } private void store ( ) throws IOException { } }

Fix:
if ( ( type . equals ( ReturnValues . class . getName ( ) ) ) && ( arg1 . parameterNames . isEmpty ( ) ) ) {
Buggy code:
public class SpanOrTermsBuilder extends SpanBuilderBase { private final Analyzer analyzer ; public SpanOrTermsBuilder ( Analyzer analyzer ) { } public SpanQuery getSpanQuery ( Element e ) throws ParserException { String fieldName = DOMUtils . getAttributeWithInheritanceOrFail ( e , "fieldName" ) ; String value = DOMUtils . getNonBlankTextOrFail ( e ) ; try { List < SpanQuery > clausesList = new ArrayList < SpanQuery > ( ) ; TokenStream ts = analyzer . tokenStream ( fieldName , new StringReader ( value ) ) ; TermToBytesRefAttribute termAtt = ts . addAttribute ( TermToBytesRefAttribute . class ) ; BytesRef bytes = termAtt . getBytesRef ( ) ; ts . reset ( ) ; while ( ts . incrementToken ( ) ) { termAtt . fillBytesRef ( ) ; <START_BUG> SpanTermQuery stq = new SpanTermQuery ( new Term ( fieldName , new BytesRef ( bytes ) ) ) ; <END_BUG> clausesList . add ( stq ) ; } ts . end ( ) ; ts . close ( ) ; SpanOrQuery soq = new SpanOrQuery ( clausesList . toArray ( new SpanQuery [ clausesList . size ( ) ] ) ) ; soq . setBoost ( DOMUtils . getAttribute ( e , "boost" , 1.0F ) ) ; return soq ; } catch ( IOException ioe ) { throw new ParserException ( ( "IOException<seq2seq4repair_space>parsing<seq2seq4repair_space>value:" + value ) ) ; } } }

Fix:
SpanTermQuery stq = new SpanTermQuery ( new org . apache . lucene . index . Term ( fieldName , BytesRef . deepCopyOf ( bytes ) ) ) ;
Buggy code:
public class PositionPickerActivity extends MapActivity implements OnClickListener { private MapView mapView ; private int requestCode ; @ Override public void onCreate ( Bundle savedInstance ) { } @ Override protected boolean isRouteDisplayed ( ) { } @ Override protected void onResume ( ) { } public void onClick ( View v ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { Log . d ( "whatsup" , ( "Returned<seq2seq4repair_space>to<seq2seq4repair_space>PositionPickerActivity<seq2seq4repair_space>with<seq2seq4repair_space>resultCode:<seq2seq4repair_space>" + resultCode ) ) ; if ( requestCode == ( Constants . ANNOTATION ) ) { if ( resultCode == ( Constants . ACTIVITY_FINISHED_OK ) ) { Log . d ( "whatsup" , "CreateAnnotationActivity<seq2seq4repair_space>finished<seq2seq4repair_space>OK" ) ; this . finish ( ) ; } if ( resultCode == ( Constants . ACTIVITY_INTERRUPTED ) ) { Log . d ( "whatsup" , "CreateAnnotationActivity<seq2seq4repair_space>did<seq2seq4repair_space>interrupt" ) ; } } if ( requestCode == ( Constants . LOG_IN ) ) { <START_BUG> if ( resultCode == ( Constants . ACTIVITY_INTERRUPTED ) ) { <END_BUG> this . finish ( ) ; } if ( resultCode == ( Constants . ACTIVITY_FINISHED_OK ) ) { this . onResume ( ) ; } } super . onActivityResult ( requestCode , resultCode , data ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } }

Fix:
if ( resultCode == ( RESULT_CANCELED ) ) {
Buggy code:
public class GenerarPDFFactura extends HttpServlet { protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { System . err . println ( ( "-->>GenerarPDFFactura<seq2seq4repair_space>servlet:<seq2seq4repair_space>RequestURI=" + ( request . getRequestURI ( ) ) ) ) ; ServletOutputStream outputStream = null ; Integer pedidoVentaId = null ; boolean fullPrint = false ; String pedidoId = null ; try { String requestURI = request . getRequestURI ( ) ; int pedidoIdIndex = ( requestURI . lastIndexOf ( "No_" ) ) + 3 ; int paraImprimirIndex = requestURI . lastIndexOf ( "_paraImprimir" ) ; int pdfIndex = requestURI . lastIndexOf ( ".pdf" ) ; System . err . println ( ( ( ( ( ( "-->>GenerarPDFFactura<seq2seq4repair_space>servlet:<seq2seq4repair_space>pedidoIdIndex=" + pedidoIdIndex ) + ",<seq2seq4repair_space>paraImprimirIndex=" ) + paraImprimirIndex ) + ",<seq2seq4repair_space>pdfIndex=" ) + pdfIndex ) ) ; if ( paraImprimirIndex > pedidoIdIndex ) { pedidoId = requestURI . substring ( pedidoIdIndex , paraImprimirIndex ) ; pedidoVentaId = Integer . parseInt ( pedidoId ) ; fullPrint = false ; } else if ( pdfIndex > pedidoIdIndex ) { pedidoId = requestURI . substring ( pedidoIdIndex , pdfIndex ) ; pedidoVentaId = Integer . parseInt ( pedidoId ) ; fullPrint = true ; } else { response . setStatus ( SC_BAD_REQUEST ) ; return ; } int pedidoVentaID = Integer . parseInt ( pedidoId ) ; EntradaSalidaQuickView pv = EntradaSalidaDAO . getInstance ( ) . findBy ( new EntradaSalida ( pedidoVentaID ) ) ; ArrayList < EntradaSalidaDetalleQuickView > entityList = EntradaSalidaDAO . getInstance ( ) . findAllESDByEntradaSalida ( pedidoVentaID ) ; Cliente clienteVenta = ClienteDAO . getInstance ( ) . findBy ( new Cliente ( pv . getClienteId ( ) ) ) ; Cfd cfdFactura = CfdDAO . getInstance ( ) . findBy ( new Cfd ( pv . getCfdId ( ) ) ) ; String uemail = request . getUserPrincipal ( ) . getName ( ) ; Usuario ui = UsuarioDAO . getInstance ( ) . findBy ( new Usuario ( uemail ) ) ; <START_BUG> byte [ ] bytesPdf = GeneradorImpresionPedidoVenta . generaPdfPfacturaPedidoVenta ( pv , cfdFactura , entityList , clienteVenta , fullPrint , ui . getNombreCompleto ( ) ) ; <END_BUG> System . err . println ( "-->>OK<seq2seq4repair_space>writing<seq2seq4repair_space>PDF<seq2seq4repair_space>bytes" ) ; response . setContentType ( "application//pdf" ) ; outputStream = response . getOutputStream ( ) ; outputStream . write ( bytesPdf ) ; outputStream . flush ( ) ; outputStream . close ( ) ; } catch ( Exception ex ) { ex . printStackTrace ( System . err ) ; } finally { } } @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } @ Override public String getServletInfo ( ) { } }

Fix:
byte [ ] bytesPdf = GeneradorImpresionPedidoVenta . generaPdfPfacturaPedidoVenta ( pv , cfdFactura , entityList , clienteVenta , fullPrint , ui . getNombreCompleto ( ) . toUpperCase ( ) ) ;
Buggy code:
public class CTabItem extends Item { CTabFolder parent ; int x ; int y ; int width ; int height = 0 ; Control control ; String toolTipText ; String shortenedText ; int shortenedTextWidth ; Font font ; Image disabledImage ; Rectangle closeRect = new Rectangle ( 0 , 0 , 0 , 0 ) ; int closeImageState = CTabFolder . NONE ; boolean showClose = false ; boolean showing = false ; static final int TOP_MARGIN = 2 ; static final int BOTTOM_MARGIN = 2 ; static final int LEFT_MARGIN = 4 ; static final int RIGHT_MARGIN = 4 ; static final int INTERNAL_SPACING = 4 ; static final int FLAGS = ( SWT . DRAW_TRANSPARENT ) | ( SWT . DRAW_MNEMONIC ) ; static final String ELLIPSIS = "..." ; public CTabItem ( CTabFolder parent , int style ) { } public CTabItem ( CTabFolder parent , int style , int index ) { } static int checkStyle ( int style ) { } static String shortenText ( GC gc , String text , int width ) { } public void dispose ( ) { } void drawClose ( GC gc ) { } void drawSelected ( GC gc ) { } void drawUnselected ( GC gc ) { } public Rectangle getBounds ( ) { } public Control getControl ( ) { } public Image getDisabledImage ( ) { } public Font getFont ( ) { } public CTabFolder getParent ( ) { } public String getToolTipText ( ) { } public boolean isShowing ( ) { } void onPaint ( GC gc , boolean isSelected ) { } int preferredHeight ( GC gc ) { } int preferredWidth ( GC gc , boolean isSelected , boolean minimum ) { } public void setControl ( Control control ) { } public void setDisabledImage ( Image image ) { } public void setFont ( Font font ) { } public void setImage ( Image image ) { checkWidget ( ) ; if ( ( image != null ) && ( image . isDisposed ( ) ) ) { SWT . error ( ERROR_INVALID_ARGUMENT ) ; } Image oldImage = getImage ( ) ; if ( ( image == null ) && ( oldImage == null ) ) return ; if ( ( image != null ) && ( image . equals ( oldImage ) ) ) return ; super . setImage ( image ) ; if ( ! ( parent . updateTabHeight ( false ) ) ) { if ( ( oldImage != null ) && ( image != null ) ) { Rectangle oldBounds = oldImage . getBounds ( ) ; Rectangle bounds = image . getBounds ( ) ; if ( ( ( bounds . width ) == ( oldBounds . width ) ) && ( ( bounds . height ) == ( oldBounds . height ) ) ) { <START_BUG> if ( isShowing ( ) ) <END_BUG> parent . redraw ( x , y , width , height , false ) ; return ; } } parent . updateItems ( ) ; parent . redrawTabs ( ) ; } } public void setText ( String string ) { } public void setToolTipText ( String string ) { } }

Fix:
if ( showing )
Buggy code:
public class OSGiDeploymentActivator { public void activate ( final BootOperationContext updateContext ) { updateContext . addDeploymentProcessor ( STRUCTURE , STRUCTURE_OSGI_MANIFEST , new OSGiManifestStructureProcessor ( ) ) ; updateContext . addDeploymentProcessor ( PARSE , PARSE_OSGI_BUNDLE_INFO , new OSGiBundleInfoParseProcessor ( ) ) ; updateContext . addDeploymentProcessor ( PARSE , PARSE_OSGI_PROPERTIES , new OSGiXServiceParseProcessor ( ) ) ; <START_BUG> updateContext . addDeploymentProcessor ( INSTALL , INSTALL_OSGI_DEPLOYMENT , new OSGiDeploymentInstallProcessor ( ) ) ; <END_BUG> } }

Fix:
updateContext . addDeploymentProcessor ( INSTALL , INSTALL_OSGI_DEPLOYMENT , new BundleInstallProcessor ( ) ) ;
Buggy code:
public class TypeReferencePattern extends MultipleSearchPattern { private char [ ] qualification ; private char [ ] simpleName ; private char [ ] decodedQualification ; private char [ ] decodedSimpleName ; private static char [ ] [ ] TAGS = new char [ ] [ ] { TYPE_REF , SUPER_REF , REF , CONSTRUCTOR_REF } ; private static char [ ] [ ] REF_TAGS = new char [ ] [ ] { REF } ; private char [ ] [ ] segments ; private int currentSegment ; private char [ ] decodedSegment ; public TypeReferencePattern ( char [ ] qualification , char [ ] simpleName , int matchMode , boolean isCaseSensitive ) { } public void decodeIndexEntry ( IEntryResult entryResult ) { } public void feedIndexRequestor ( IIndexSearchRequestor requestor , int detailLevel , int [ ] references , IndexInput input , IJavaSearchScope scope ) throws IOException { } protected char [ ] [ ] getPossibleTags ( ) { } protected boolean hasNextQuery ( ) { } public char [ ] indexEntryPrefix ( ) { } protected int matchContainer ( ) { } protected boolean matchIndexEntry ( ) { } protected void matchReportReference ( AstNode reference , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } protected void matchReportReference ( QualifiedNameReference qNameRef , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } protected void matchReportReference ( QualifiedTypeReference qTypeRef , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } protected void resetQuery ( ) { } public String toString ( ) { } public int matchLevel ( AstNode node , boolean resolve ) { } private int matchLevel ( ImportReference importRef , boolean resolve ) { } private int matchLevel ( NameReference nameRef , boolean resolve ) { } protected void matchReportReference ( ArrayTypeReference arrayRef , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { <START_BUG> char [ ] [ ] tokens = ( ( this . simpleName ) == null ) ? NO_CHAR_CHAR : new char [ ] [ ] { this . simpleName } ; <END_BUG> locator . reportAccurateReference ( arrayRef . sourceStart , arrayRef . sourceEnd , tokens , element , accuracy ) ; } private int matchLevel ( TypeReference typeRef , boolean resolve ) { } protected void matchReportImportRef ( ImportReference importRef , Binding binding , IJavaElement element , int accuracy , MatchLocator locator ) throws CoreException { } public int matchLevel ( Binding binding ) { } }

Fix:
char [ ] [ ] tokens = ( ( this . simpleName ) == null ) ? CharOperation . NO_CHAR_CHAR : new char [ ] [ ] { this . simpleName } ;
Buggy code:
public class FontDefinition implements ICategorizedThemeElementDefinition , IEditable , IHierarchalThemeElementDefinition { private String label ; private String id ; private String defaultsTo ; private String categoryId ; private String description ; private String value ; private boolean isEditable ; private FontData [ ] parsedValue ; public FontDefinition ( String fontName , String uniqueId , String defaultsId , String value , String categoryId , boolean isEditable , String fontDescription ) { } public FontDefinition ( FontDefinition originalFont , FontData [ ] datas ) { } public String getDefaultsTo ( ) { } public String getDescription ( ) { } public String getName ( ) { } public String getId ( ) { } public String getCategoryId ( ) { } public FontData [ ] getValue ( ) { if ( ( value ) == null ) return null ; if ( ( parsedValue ) == null ) { <START_BUG> parsedValue = JFaceResources . getFontRegistry ( ) . bestDataArray ( StringConverter . asFontDataArray ( value ) , Workbench . getInstance ( ) . getDisplay ( ) ) ; <END_BUG> } return parsedValue ; } public boolean isEditable ( ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } }

Fix:
parsedValue = JFaceResources . getFontRegistry ( ) . filterData ( StringConverter . asFontDataArray ( value ) , Workbench . getInstance ( ) . getDisplay ( ) ) ;
Buggy code:
public class GetAnnotation extends HttpServlet { private static final long serialVersionUID = - 150691783774775448L ; public void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { try { HttpSession session = request . getSession ( false ) ; PrintWriter out = response . getWriter ( ) ; if ( session != null ) { String email = ( ( String ) ( session . getAttribute ( "email" ) ) ) ; String bookId = ( ( String ) ( request . getParameter ( "bookId" ) ) ) ; String pNum = ( ( String ) ( request . getParameter ( "pNum" ) ) ) ; AnnotationModel model = new AnnotationModel ( ) ; List < DBObject > annotList = model . get ( bookId , email , Integer . parseInt ( pNum ) ) ; response . setContentType ( "text//html;charset=UTF-8" ) ; int size = annotList . size ( ) ; if ( size > 0 ) { for ( int i = 0 ; i < size ; i ++ ) { DBObject a = annotList . get ( i ) ; String tempOwner = ( ( String ) ( a . get ( "owner" ) ) ) ; String title = ( ( String ) ( a . get ( "title" ) ) ) ; String time = ( ( String ) ( a . get ( "time" ) ) ) ; boolean isPublic = Boolean . valueOf ( ( ( String ) ( a . get ( "isPublic" ) ) ) ) ; String printStr = ( ( ( ( ( ( ( "<div<seq2seq4repair_space>class='annotation'><div><span<seq2seq4repair_space>class='note_text'>" + ( ( String ) ( a . get ( "text" ) ) ) ) + "<//span><br><span<seq2seq4repair_space>class='author'>" ) + tempOwner ) + "<seq2seq4repair_space>@" ) + title ) + "<//span><span<seq2seq4repair_space>class='time'><seq2seq4repair_space>|<seq2seq4repair_space>" ) + time ) + "<//span>" ; if ( tempOwner != null ) { if ( tempOwner . equals ( email ) ) { if ( ! isPublic ) printStr += "<span<seq2seq4repair_space>class='make_public'<seq2seq4repair_space>title='Make<seq2seq4repair_space>public'><seq2seq4repair_space>Publish<//span>" ; else <START_BUG> printStr += "<span<seq2seq4repair_space>class='make_public'<seq2seq4repair_space>title='Make<seq2seq4repair_space>public'><seq2seq4repair_space>Published!<//span>" ; <END_BUG> printStr += "<span<seq2seq4repair_space>class='delete_note'<seq2seq4repair_space>title='Delete<seq2seq4repair_space>note'><seq2seq4repair_space>Delete<//span>" ; } } printStr += ( ( ( ( ( "<span<seq2seq4repair_space>class='annot_data'<seq2seq4repair_space>id='annot_b_id'>" + ( ( String ) ( a . get ( "bookId" ) ) ) ) + "<//span><span<seq2seq4repair_space>class='annot_data'<seq2seq4repair_space>id='annot_p_num'>" ) + ( a . get ( "pNum" ) ) ) + "<//span><span<seq2seq4repair_space>class='annot_data'<seq2seq4repair_space>id='annot_id'>" ) + ( a . get ( "_id" ) . toString ( ) ) ) + "<//span><//div><//div>" ; out . print ( printStr ) ; } } else out . print ( "" ) ; } else out . print ( "" ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } }

Fix:
printStr += "<span<seq2seq4repair_space>class='is_public'<seq2seq4repair_space>title='Published'><seq2seq4repair_space>Published!<//span>" ;
Buggy code:
public abstract class BaseOperationCommand extends CommandHandlerWithHelp implements OperationCommand { protected List < RequestParameterArgument > params = new ArrayList < RequestParameterArgument > ( ) ; protected OperationRequestAddress requiredAddress ; public BaseOperationCommand ( String command ) { } public BaseOperationCommand ( String command , boolean connectionRequired ) { } protected void addRequiredPath ( String requiredPath ) { } protected void addRequiredPath ( OperationRequestAddress requiredPath ) { } @ Override public boolean isAvailable ( CommandContext ctx ) { } @ Override protected void doHandle ( CommandContext ctx ) throws CommandFormatException { } @ Override public void addArgument ( CommandArgument arg ) { } protected void setParams ( CommandContext ctx , ModelNode request ) throws CommandFormatException { for ( RequestParameterArgument arg : params ) { <START_BUG> arg . set ( ctx . getParsedArguments ( ) , request ) ; <END_BUG> } } }

Fix:
arg . set ( ctx . getParsedCommandLine ( ) , request ) ;
Buggy code:
public class CurrentGraphicState { HashMap allGraphicEvents ; LinkedList < GraphicEvent > eventsWithLifetime ; public CurrentGraphicState ( ) { } public void gameTick ( int currentTime ) { ListIterator itrUnits = this . eventsWithLifetime . listIterator ( ) ; GraphicEvent currentEvent ; while ( itrUnits . hasNext ( ) ) { currentEvent = ( ( GraphicEvent ) ( itrUnits . next ( ) ) ) ; if ( currentEvent . shouldBeRemoved ( currentTime ) ) { <START_BUG> this . eventsWithLifetime . remove ( ) ; <END_BUG> this . allGraphicEvents . remove ( currentEvent . getId ( ) ) ; } } } public void addGraphicEvent ( GraphicEvent e ) { } public void removeGraphicEvent ( GraphicEvent e ) { } public Stack getCurrentGraphicState ( ) { } }

Fix:
itrUnits . remove ( ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class EJBClientUserTransactionTestCase { private static final Logger logger = Logger . getLogger ( EJBClientUserTransactionTestCase . class ) ; private static final String APP_NAME = "ejb-remote-client-api-usertx-test" ; private static final String MODULE_NAME = "ejb" ; private static String nodeName ; @ Deployment public static Archive < ? > createDeployment ( ) { final EnterpriseArchive ear = ShrinkWrap . create ( EnterpriseArchive . class , ( ( EJBClientUserTransactionTestCase . APP_NAME ) + ".ear" ) ) ; final JavaArchive jar = ShrinkWrap . create ( JavaArchive . class , ( ( EJBClientUserTransactionTestCase . MODULE_NAME ) + ".jar" ) ) ; jar . addPackage ( EJBClientUserTransactionTestCase . class . getPackage ( ) ) ; <START_BUG> jar . addAsManifestResource ( "ejb//remote//client//tx//persistence.xml" , "persistence.xml" ) ; <END_BUG> ear . addAsModule ( jar ) ; return ear ; } @ BeforeClass public static void beforeTestClass ( ) throws Exception { } @ Test public void testEmptyTxCommit ( ) throws Exception { } @ Test public void testEmptyTxRollback ( ) throws Exception { } @ Before public void beforeTest ( ) throws Exception { } @ Test public void testMandatoryTxOnSLSB ( ) throws Exception { } @ Test public void testBatchOperationsInTx ( ) throws Exception { } }

Fix:
jar . addAsManifestResource ( EJBClientUserTransactionTestCase . class . getPackage ( ) , "persistence.xml" , "persistence.xml" ) ;
Buggy code:
@ Entity public class RecordEntry implements Serializable { private static final long serialVersionUID = 1L ; @ Id @ GeneratedValue ( strategy = GenerationType . AUTO ) private Long id ; private Long entryNo ; @ Temporal ( TemporalType . TIMESTAMP ) private Calendar entryTime ; @ Lob @ Column ( length = 2048 ) private String payload ; @ ManyToOne private RecordSession recordSession ; public Long getId ( ) { } public void setId ( Long id ) { } public RecordSession getRecordSession ( ) { } public void setRecordSession ( RecordSession recordSession ) { } public Long getEntryNo ( ) { } public void setEntryNo ( Long entryNo ) { } public String getPayload ( ) { } public void setPayload ( String payload ) { } public Calendar getEntryTime ( ) { } public void setEntryTime ( Calendar entryTime ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object object ) { } @ Override public String toString ( ) { <START_BUG> return ( "com.imaginea.botbot.server.Record[<seq2seq4repair_space>id=" + ( id ) ) + "<seq2seq4repair_space>]" ; <END_BUG> } }

Fix:
return ( "com.imaginea.botbot.server.RecordEntry[<seq2seq4repair_space>id=" + ( id ) ) + "<seq2seq4repair_space>]" ;
Buggy code:
public class LazyFileOutputStream extends OutputStream { private FileOutputStream fos ; private File file ; private boolean append ; private boolean alwaysCreate ; private boolean opened = false ; private boolean closed = false ; public LazyFileOutputStream ( String name ) { } public LazyFileOutputStream ( String name , boolean append ) { } public LazyFileOutputStream ( File f ) { } public LazyFileOutputStream ( File file , boolean append ) { } public LazyFileOutputStream ( File file , boolean append , boolean alwaysCreate ) { } public void open ( ) throws IOException { } public synchronized void close ( ) throws IOException { <START_BUG> if ( alwaysCreate ) { <END_BUG> ensureOpened ( ) ; } if ( opened ) { fos . close ( ) ; } closed = true ; } public void write ( byte [ ] b ) throws IOException { } public synchronized void write ( byte [ ] b , int offset , int len ) throws IOException { } public synchronized void write ( int b ) throws IOException { } private synchronized void ensureOpened ( ) throws IOException { } }

Fix:
if ( ( alwaysCreate ) && ( ! ( closed ) ) ) {
Buggy code:
public class ResourceTestSJF { public static void main ( String [ ] args ) { ProcessGenerator procGen = new ProcessGenerator ( 40 , 10 , 50 ) ; Resource resource = new Resource ( procGen ) ; <START_BUG> resource . simulateProcesses ( 10 ) ; <END_BUG> resource . SJFAlgorithm ( ) ; resource . printDoneData ( ) ; } }

Fix:
resource . simulateProcesses ( 5 ) ;
Buggy code:
public class MainActivity extends Activity implements OnClickListener { private Button play ; private Button pause ; private Button stop ; private MediaPlayer mediaPlayer = new MediaPlayer ( ) ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void initMediaPlayer ( ) { try { <START_BUG> File file = new File ( Environment . getExternalStorageDirectory ( ) , "//kgmusic//download//·ï»Ë´«Ææ<seq2seq4repair_space>-<seq2seq4repair_space>×îìÅÃñ×å·ç.mp3" ) ; <END_BUG> mediaPlayer . setDataSource ( file . getPath ( ) ) ; mediaPlayer . prepare ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } @ Override public void onClick ( View v ) { } @ Override protected void onDestroy ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
File file = new File ( Environment . getExternalStorageDirectory ( ) , "//¸èÇú//ÕÅÑ§ÓÑ<seq2seq4repair_space>-<seq2seq4repair_space>³±Ë®µÄÅµÑÔ.mp3" ) ;
Buggy code:
public class CompilerMessagesTest extends AjdeTestCase { private final String CONFIG_FILE_PATH = "..//examples//declare-warning//all.lst" ; public CompilerMessagesTest ( String name ) { } public void testMessages ( ) { List msgs = NullIdeManager . getIdeManager ( ) . getCompilationSourceLineTasks ( ) ; if ( 2 != ( msgs . size ( ) ) ) { assertTrue ( ( "not<seq2seq4repair_space>two<seq2seq4repair_space>messages:<seq2seq4repair_space>" + msgs ) , false ) ; } assertEquals ( "Two<seq2seq4repair_space>warning<seq2seq4repair_space>messages<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>produced" , 2 , msgs . size ( ) ) ; NullIdeTaskListManager . SourceLineTask task = ( ( NullIdeTaskListManager . SourceLineTask ) ( msgs . get ( 0 ) ) ) ; assertEquals ( 8 , task . getContainedMessage ( ) . getSourceLocation ( ) . getLine ( ) ) ; assertEquals ( "Please<seq2seq4repair_space>don't<seq2seq4repair_space>call<seq2seq4repair_space>init<seq2seq4repair_space>methods" , task . message . getMessage ( ) ) ; try { String fullyQualifiedFile = task . getContainedMessage ( ) . getSourceLocation ( ) . getSourceFile ( ) . getCanonicalPath ( ) ; fullyQualifiedFile = fullyQualifiedFile . replace ( '\\' , '//' ) ; <START_BUG> assertTrue ( "Fully-qualified<seq2seq4repair_space>source<seq2seq4repair_space>file<seq2seq4repair_space>location<seq2seq4repair_space>returned" , fullyQualifiedFile . endsWith ( "testdata//examples//declare-warning//apackage//SomeClass.java" ) ) ; <END_BUG> } catch ( IOException ex ) { assertTrue ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>convert<seq2seq4repair_space>source<seq2seq4repair_space>file<seq2seq4repair_space>location:<seq2seq4repair_space>" + ( task . getContainedMessage ( ) . getSourceLocation ( ) . getSourceFile ( ) ) ) , false ) ; } } public void testDeclareMessageContents ( ) { } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } }

Fix:
assertTrue ( "Fully-qualified<seq2seq4repair_space>source<seq2seq4repair_space>file<seq2seq4repair_space>location<seq2seq4repair_space>returned" , fullyQualifiedFile . endsWith ( "//examples//declare-warning//apackage//SomeClass.java" ) ) ;