nus-yam/ex-repair huggingface dataset:
Buggy code:
public class PackageFragmentRoot extends Openable implements IPackageFragmentRoot { protected IResource fResource ; protected PackageFragmentRoot ( IResource resource , IJavaProject project ) { } protected PackageFragmentRoot ( IResource resource , IJavaProject project , String path ) { } public void attachSource ( IPath zipPath , IPath rootPath , IProgressMonitor monitor ) throws JavaModelException { } protected boolean computeChildren ( OpenableElementInfo info ) throws JavaModelException { } protected void computeFolderChildren ( IContainer folder , String prefix , ArrayList vChildren , char [ ] [ ] exclusionPatterns ) throws JavaModelException { } protected OpenableElementInfo createElementInfo ( ) { } public IPackageFragment createPackageFragment ( String name , boolean force , IProgressMonitor monitor ) throws JavaModelException { } protected int determineKind ( IResource underlyingResource ) throws JavaModelException { } public boolean equals ( Object o ) { } public boolean exists ( ) { } char [ ] [ ] getExclusionPatterns ( ) { try { ClasspathEntry entry = ( ( ClasspathEntry ) ( getRawClasspathEntry ( ) ) ) ; if ( entry == null ) { return null ; } else { <START_BUG> return entry . fulExclusionPatternChars ( ) ; <END_BUG> } } catch ( JavaModelException e ) { return null ; } } protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { } protected char getHandleMementoDelimiter ( ) { } public int getKind ( ) throws JavaModelException { } public Object [ ] getNonJavaResources ( ) throws JavaModelException { } public IPackageFragment getPackageFragment ( String packageName ) { } protected String getPackageName ( IFolder folder ) throws JavaModelException { } public IPath getPath ( ) { } public IClasspathEntry getRawClasspathEntry ( ) throws JavaModelException { } public IResource getResource ( ) { } public IPath getSourceAttachmentPath ( ) throws JavaModelException { } public IPath getSourceAttachmentRootPath ( ) throws JavaModelException { } public IResource getUnderlyingResource ( ) throws JavaModelException { } public int hashCode ( ) { } public boolean isArchive ( ) { } public boolean isExternal ( ) { } protected boolean isOnClasspath ( ) { } protected void openWhenClosed ( IProgressMonitor pm ) throws JavaModelException { } public void refreshChildren ( ) { } public IJavaElement rootedAt ( IJavaProject project ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } }

Fix:
return entry . fullExclusionPatternChars ( ) ;
Buggy code:
public class JavaSampler extends AbstractSampler implements TestListener { public static final String CLASSNAME = "classname" ; public static final String ARGUMENTS = "arguments" ; private transient JavaSamplerClient javaClient = null ; private transient JavaSamplerContext context = null ; private static transient Logger log = LoggingManager . getLoggerForClass ( ) ; private static Set allSamplers = new HashSet ( ) ; public JavaSampler ( ) { } public void setArguments ( Arguments args ) { } public Arguments getArguments ( ) { } private void releaseJavaClient ( ) { } public void setClassname ( String classname ) { } public String getClassname ( ) { } public SampleResult sample ( Entry entry ) { } private JavaSamplerClient createJavaClient ( ) { } private String whoAmI ( ) { } public void testStarted ( ) { } public void testStarted ( String host ) { } public void testEnded ( ) { } public void testEnded ( String host ) { } public void testIterationStart ( LoopIterationEvent event ) { } class ErrorSamplerClient extends AbstractJavaSamplerClient { <START_BUG> public SampleResult runTest ( JavaSamplerContext context ) { <END_BUG> JavaSampler . log . debug ( ( ( whoAmI ( ) ) + "\trunTest" ) ) ; Thread . yield ( ) ; SampleResult results = new SampleResult ( ) ; results . setSuccessful ( false ) ; results . setResponseData ( ( "Class<seq2seq4repair_space>not<seq2seq4repair_space>found:<seq2seq4repair_space>" + ( getClassname ( ) ) ) . getBytes ( ) ) ; results . setSampleLabel ( ( "ERROR:<seq2seq4repair_space>" + ( getClassname ( ) ) ) ) ; return results ; } } }

Fix:
public SampleResult runTest ( JavaSamplerContext p_context ) {
Buggy code:
public class SourceTypeElementInfo extends MemberElementInfo implements ISourceType { protected static final ISourceImport [ ] NO_IMPORTS = new ISourceImport [ 0 ] ; protected static final ISourceField [ ] NO_FIELDS = new ISourceField [ 0 ] ; protected static final ISourceMethod [ ] NO_METHODS = new ISourceMethod [ 0 ] ; protected static final ISourceType [ ] NO_TYPES = new ISourceType [ 0 ] ; protected char [ ] superclassName ; protected char [ ] [ ] superInterfaceNames ; protected char [ ] enclosingTypeName ; protected char [ ] sourceFileName ; protected char [ ] packageName ; protected char [ ] qualifiedName ; private ISourceImport [ ] imports ; protected IType fHandle = null ; public ISourceType getEnclosingType ( ) { } public char [ ] getEnclosingTypeName ( ) { } public ISourceField [ ] getFields ( ) { } public char [ ] getFileName ( ) { } public IType getHandle ( ) { } public ISourceImport [ ] getImports ( ) { if ( ( this . imports ) == null ) { try { IImportDeclaration [ ] importDeclarations = this . fHandle . getCompilationUnit ( ) . getImports ( ) ; int length = importDeclarations . length ; if ( length == 0 ) { this . imports = SourceTypeElementInfo . NO_IMPORTS ; } else { <START_BUG> this . imports = new ISourceImport [ importDeclarations . length ] ; <END_BUG> for ( int i = 0 ; i < length ; i ++ ) { imports [ i ] = ( ( ImportDeclarationElementInfo ) ( ( ( ImportDeclaration ) ( importDeclarations [ i ] ) ) . getElementInfo ( ) ) ) ; } } } catch ( JavaModelException e ) { this . imports = SourceTypeElementInfo . NO_IMPORTS ; } } return this . imports ; } public char [ ] [ ] getInterfaceNames ( ) { } public ISourceType [ ] getMemberTypes ( ) { } public ISourceMethod [ ] getMethods ( ) { } public char [ ] getPackageName ( ) { } public char [ ] getQualifiedName ( ) { } public char [ ] getSuperclassName ( ) { } public boolean isBinaryType ( ) { } public boolean isClass ( ) { } public boolean isInterface ( ) { } protected void setEnclosingTypeName ( char [ ] enclosingTypeName ) { } protected void setHandle ( IType handle ) { } protected void setPackageName ( char [ ] name ) { } protected void setQualifiedName ( char [ ] name ) { } protected void setSourceFileName ( char [ ] name ) { } protected void setSuperclassName ( char [ ] superclassName ) { } protected void setSuperInterfaceNames ( char [ ] [ ] superInterfaceNames ) { } public String toString ( ) { } }

Fix:
this . imports = new ISourceImport [ length ] ;
Buggy code:
public class CSharp extends DotnetCompile { String definitions ; private File docFile ; private int fileAlign = 0 ; private boolean fullpaths = false ; private boolean incremental ; protected boolean unsafe ; private boolean noconfig = false ; public CSharp ( ) { } public void clear ( ) { } public void setDocFile ( File f ) { } protected String getDocFileParameter ( ) { } public void setFileAlign ( int fileAlign ) { } protected String getFileAlignParameter ( ) { <START_BUG> if ( ( fileAlign ) != 0 ) { <END_BUG> return "//filealign:" + ( fileAlign ) ; } else { return null ; } } public void setFullPaths ( boolean enabled ) { } protected String getFullPathsParameter ( ) { } public void setIncremental ( boolean incremental ) { } public boolean getIncremental ( ) { } protected String getIncrementalParameter ( ) { } public void setOutputFile ( File params ) { } public void setUnsafe ( boolean unsafe ) { } public boolean getUnsafe ( ) { } protected String getUnsafeParameter ( ) { } public void setNoConfig ( boolean enabled ) { } protected String getNoConfigParameter ( ) { } public void setDefinitions ( String params ) { } protected String getDefinitionsParameter ( ) { } public void addCompilerSpecificOptions ( NetCommand command ) { } public String getReferenceDelimiter ( ) { } public String getFileExtension ( ) { } protected String createResourceParameter ( DotnetResource resource ) { } }

Fix:
if ( ( ( fileAlign ) != 0 ) && ( ! ( "mcs" . equals ( getExecutable ( ) ) ) ) ) {
Buggy code:
class RejectedAttributesLogContext { private final AbstractChainedContext context ; private final PathAddress address ; private final ModelNode op ; Map < String , RejectAttributeChecker > failedCheckers ; Map < String , Map < String , ModelNode > > failedAttributes ; RejectedAttributesLogContext ( TransformationRule . AbstractChainedContext context , PathAddress address , ModelNode op ) { } void checkAttribute ( RejectAttributeChecker checker , String attributeName , ModelNode attributeValue ) { } private void reject ( RejectAttributeChecker checker , String attributeName , ModelNode attributeValue ) { } boolean hasRejections ( ) { } @ Deprecated String errorOrWarn ( ) throws OperationFailedException { if ( ( failedAttributes ) == null ) { return "" ; } final TransformationTarget tgt = context . getContext ( ) . getTarget ( ) ; final String legacyHostName = tgt . getHostName ( ) ; final ModelVersion coreVersion = tgt . getVersion ( ) ; final String subsystemName = RejectedAttributesLogContext . findSubsystemName ( address ) ; final ModelVersion usedVersion = ( subsystemName == null ) ? coreVersion : tgt . getSubsystemVersion ( subsystemName ) ; final TransformersLogger logger = context . getContext ( ) . getLogger ( ) ; <START_BUG> final boolean error = ( ( op ) == null ) && ( context . getContext ( ) . doesTargetSupportIgnoredResources ( context . getContext ( ) . getTarget ( ) ) ) ; <END_BUG> List < String > messages = ( error ) ? new ArrayList < String > ( ) : null ; for ( Map . Entry < String , Map < String , ModelNode > > entry : failedAttributes . entrySet ( ) ) { RejectAttributeChecker checker = failedCheckers . get ( entry . getKey ( ) ) ; String message = checker . getRejectionLogMessage ( entry . getValue ( ) ) ; if ( error ) { messages . add ( message ) ; } else { if ( ( op ) == null ) { logger . logWarning ( address , null , message , entry . getValue ( ) . keySet ( ) ) ; } else { return logger . getWarning ( address , op , message , entry . getValue ( ) . keySet ( ) ) ; } } } if ( error ) { if ( subsystemName != null ) { throw MESSAGES . rejectAttributesSubsystemModelResourceTransformer ( address , legacyHostName , subsystemName , usedVersion , messages ) ; } throw MESSAGES . rejectAttributesCoreModelResourceTransformer ( address , legacyHostName , usedVersion , messages ) ; } return null ; } private static String findSubsystemName ( PathAddress pathAddress ) { } }

Fix:
final boolean error = ( ( op ) == null ) && ( tgt . isIgnoredResourceListAvailableAtRegistration ( ) ) ;
Buggy code:
public class HumanoidMob extends Mob { public String lastHumanoidSkinName ; private String skinName ; private BufferedImage skinBitmap ; private volatile BufferedImage newSkinBitmap ; private volatile int textureId = - 1 ; protected HumanoidMob ( Level level , String modelName , float posX , float posY , float posZ ) { } @ Override public void renderModel ( TextureManager textures , float var2 , float var3 , float var4 , float yawDegrees , float pitchDegrees , float scale ) { } private void renderBlock ( TextureManager textures ) { } public void renderSheep ( TextureManager textureManager , float var2 , float var3 , float var4 , float yawDegrees , float pitchDegrees , float scale ) { } public String getSkinName ( ) { } public final synchronized void setModel ( String newName ) { } public synchronized void resetSkin ( ) { } public void reloadSkin ( ) { } public synchronized void unloadSkin ( TextureManager textureManager ) { } public synchronized void setSkinImage ( String skinName , BufferedImage image ) { } public void forceTextureReload ( ) { } public synchronized void setSkin ( String skinName ) { if ( ( skinName == null ) || ( ( skinName . length ( ) ) == 0 ) ) { resetSkin ( ) ; return ; } if ( isInteger ( modelName ) ) { return ; } this . skinName = skinName ; String lowercaseUrl = skinName . toLowerCase ( ) ; boolean isFullUrl = ( ( lowercaseUrl . startsWith ( "http:////" ) ) || ( lowercaseUrl . startsWith ( "https:////" ) ) ) && ( lowercaseUrl . endsWith ( ".png" ) ) ; boolean isHumanoid = HUMANOID . equals ( modelName ) ; String downloadUrl ; if ( isFullUrl ) { downloadUrl = skinName ; } else { <START_BUG> downloadUrl = ( ( Minecraft . skinServer ) + skinName ) + ".png" ; <END_BUG> } if ( isHumanoid || isFullUrl ) { new SkinDownloadThread ( this , downloadUrl , skinName , ( ! isHumanoid ) ) . start ( ) ; } } @ Override public void bindTexture ( TextureManager textureManager ) { } }

Fix:
downloadUrl = ( ( Minecraft . skinServer ) + ( skinName . replaceAll ( "[^a-zA-Z0-9:._]" , "" ) ) ) + ".png" ;
Buggy code:
public abstract class WicketTestCase extends TestCase { public MockWebApplication application ; public WicketTestCase ( String name ) { } protected void setUp ( ) throws Exception { } protected void executeTest ( final Class pageClass , final String filename ) throws Exception { System . out . println ( ( ( "===<seq2seq4repair_space>" + ( pageClass . getName ( ) ) ) + "<seq2seq4repair_space>===" ) ) ; <START_BUG> application . getPages ( ) . setHomePage ( pageClass ) ; <END_BUG> application . setupRequestAndResponse ( ) ; application . processRequestCycle ( ) ; assertEquals ( pageClass , application . getLastRenderedPage ( ) . getClass ( ) ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( DiffUtil . validatePage ( document , this . getClass ( ) , filename ) ) ; } }

Fix:
application . getRequiredPageSettings ( ) . setHomePage ( pageClass ) ;
Buggy code:
public class ResourceAdapterView extends SuspendableViewImpl implements ResourceAdapterPresenter . MyView { private ResourceAdapterPresenter presenter ; private PagedView panel ; private AdapterList adapterList ; private List < ResourceAdapter > adapters ; private ConnectionList connectionList ; private AdminObjectList adminObjects ; @ Override public void setPresenter ( ResourceAdapterPresenter presenter ) { } @ Override public Widget createWidget ( ) { LayoutPanel layout = new LayoutPanel ( ) ; FakeTabPanel titleBar = new FakeTabPanel ( "Resource<seq2seq4repair_space>Adapter" ) ; layout . add ( titleBar ) ; panel = new PagedView ( ) ; this . adapterList = new AdapterList ( presenter ) ; this . connectionList = new ConnectionList ( presenter ) ; this . adminObjects = new AdminObjectList ( presenter ) ; panel . addPage ( CONSTANTS . common_label_back ( ) , adapterList . asWidget ( ) ) ; panel . addPage ( "Connection<seq2seq4repair_space>Definitions" , connectionList . asWidget ( ) ) ; panel . addPage ( "Admin<seq2seq4repair_space>Objects" , adminObjects . asWidget ( ) ) ; panel . showPage ( 0 ) ; Widget panelWidget = panel . asWidget ( ) ; layout . add ( panelWidget ) ; layout . setWidgetTopHeight ( titleBar , 0 , PX , 40 , PX ) ; <START_BUG> layout . setWidgetTopHeight ( panelWidget , 28 , PX , 100 , PCT ) ; <END_BUG> return layout ; } @ Override public void setSelectedAdapter ( String selectedAdapter ) { } @ Override public void setAdapters ( List < ResourceAdapter > adapters ) { } }

Fix:
layout . setWidgetTopHeight ( panelWidget , 40 , PX , 100 , PCT ) ;
Buggy code:
public class UIUtils { private static final int NUMBER_OF_COLUMNS = 20 ; public static TextArea createTextArea ( String aText , Font aFont ) { TextArea item = new TextArea ( ) ; item . getStyle ( ) . setFont ( aFont ) ; item . getUnselectedStyle ( ) . setFont ( aFont ) ; item . setEditable ( false ) ; item . setFocusable ( false ) ; item . setColumns ( UIUtils . NUMBER_OF_COLUMNS ) ; item . setRows ( 1 ) ; item . setGrowByContent ( false ) ; <START_BUG> item . setText ( aText ) ; <END_BUG> int pw = ( Display . getInstance ( ) . getDisplayWidth ( ) ) - 10 ; int w = aFont . stringWidth ( aText ) ; if ( w >= pw ) { item . setGrowByContent ( true ) ; item . setRows ( 2 ) ; } else { item . setGrowByContent ( false ) ; item . setRows ( 1 ) ; } return item ; } public static TextArea createTextArea ( String aText , Font aFont , int aColor ) { } public static TextArea createQuestionName ( String aText ) { } }

Fix:
item . setText ( ( ( aText . trim ( ) ) + "<seq2seq4repair_space>" ) ) ;
Buggy code:
public class WebPage extends Page implements IHeaderRenderer { private static Log log = LogFactory . getLog ( WebPage . class ) ; private static final long serialVersionUID = 1L ; private String bodyOnLoad ; protected WebPage ( ) { } protected WebPage ( final IModel model ) { } protected WebPage ( final PageParameters parameters ) { } public final void appendToBodyOnLoad ( final String onLoad ) { } public String getBodyOnLoad ( ) { } public String getMarkupType ( ) { } public final void renderHeaderSections ( final HtmlHeaderContainer container ) { } protected final WebRequestCycle getWebRequestCycle ( ) { } protected final BookmarkablePageLink homePageLink ( final String id ) { <START_BUG> return new BookmarkablePageLink ( id , getApplicationPages ( ) . getHomePage ( ) ) ; <END_BUG> } protected void onEndRequest ( ) { } }

Fix:
return new BookmarkablePageLink ( id , getApplication ( ) . getHomePage ( ) ) ;
Buggy code:
public class BrowserInfoPage extends WebPage { private static final Logger log = LoggerFactory . getLogger ( BrowserInfoPage . class ) ; private static final long serialVersionUID = 1L ; private String continueTo ; public BrowserInfoPage ( PageParameters parameters ) { } public BrowserInfoPage ( final String continueTo ) { } @ Override public boolean isVersioned ( ) { } private final void initComps ( ) { } protected final void continueToPrevious ( ) { } void warnNotUsingWebClientInfo ( ClientInfo clientInfo ) { } protected final void setContinueTo ( String continueTo ) { if ( continueTo == null ) { throw new IllegalArgumentException ( "Argument<seq2seq4repair_space>continueTo<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; } else if ( continueTo . contains ( ":////" ) ) { <START_BUG> throw new IllegalArgumentException ( ( ( "continuTo<seq2seq4repair_space>url<seq2seq4repair_space>:<seq2seq4repair_space>" + continueTo ) + "<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>relative<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>current<seq2seq4repair_space>server." ) ) { <END_BUG> @ Override public StackTraceElement [ ] getStackTrace ( ) { return new StackTraceElement [ 0 ] ; } } ; } this . continueTo = continueTo ; } }

Fix:
throw new IllegalArgumentException ( ( ( "continueTo<seq2seq4repair_space>url<seq2seq4repair_space>:<seq2seq4repair_space>" + continueTo ) + "<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>relative<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>current<seq2seq4repair_space>server." ) ) {
Buggy code:
public class Cock extends Command { private int i ; public Cock ( ) { } protected void initialize ( ) { } protected void execute ( ) { } protected boolean isFinished ( ) { } protected void end ( ) { shooter . stop ( ) ; <START_BUG> shooter . SetIsCocked ( true ) ; <END_BUG> } protected void interrupted ( ) { } }

Fix:
shooter . setIsCocked ( true ) ;
Buggy code:
final class Default < T extends IProtocol & jm . device . IProtocol > { private Box _box ; private Shared _shared ; private T _protocol ; public Default ( Box box , Shared shared , T protocol ) { } public boolean sendOneFrame ( byte [ ] data , boolean needRecv ) { _shared . buffID = 0 ; <START_BUG> if ( _box . newBatch ( _shared . buffID ) ) { <END_BUG> return false ; } byte [ ] sendBuff = _protocol . pack ( data ) ; if ( sendBuff == null ) { return false ; } if ( needRecv ) { if ( ( ( ( ! ( _box . sendOutData ( 0 , sendBuff . length , sendBuff ) ) ) || ( ! ( _box . runReceive ( RECEIVE ) ) ) ) || ( ! ( _box . endBatch ( ) ) ) ) || ( ! ( _box . runBatch ( false , _shared . buffID ) ) ) ) { return false ; } } else { if ( ( ( ! ( _box . sendOutData ( 0 , sendBuff . length , sendBuff ) ) ) || ( ! ( _box . endBatch ( ) ) ) ) || ( ! ( _box . runBatch ( false , _shared . buffID ) ) ) ) { return false ; } } _protocol . finishExecute ( ( ! needRecv ) ) ; return true ; } public boolean setKeepLink ( byte [ ] data ) { } }

Fix:
if ( ! ( _box . newBatch ( _shared . buffID ) ) ) {
Buggy code:
public class KMeansDriver extends AbstractJob { private static final Logger log = LoggerFactory . getLogger ( KMeansDriver . class ) ; public static void main ( String [ ] args ) throws Exception { } @ Override public int run ( String [ ] args ) throws Exception { } public static void run ( Configuration conf , Path input , Path clustersIn , Path output , DistanceMeasure measure , double convergenceDelta , int maxIterations , boolean runClustering , double clusterClassificationThreshold , boolean runSequential ) throws IOException , ClassNotFoundException , InterruptedException { } public static void run ( Path input , Path clustersIn , Path output , DistanceMeasure measure , double convergenceDelta , int maxIterations , boolean runClustering , double clusterClassificationThreshold , boolean runSequential ) throws IOException , ClassNotFoundException , InterruptedException { } public static Path buildClusters ( Configuration conf , Path input , Path clustersIn , Path output , DistanceMeasure measure , int maxIterations , String delta , boolean runSequential ) throws IOException , ClassNotFoundException , InterruptedException { } public static void clusterData ( Configuration conf , Path input , Path clustersIn , Path output , DistanceMeasure measure , double clusterClassificationThreshold , boolean runSequential ) throws IOException , ClassNotFoundException , InterruptedException { if ( KMeansDriver . log . isInfoEnabled ( ) ) { KMeansDriver . log . info ( "Running<seq2seq4repair_space>Clustering" ) ; KMeansDriver . log . info ( "Input:<seq2seq4repair_space>{}<seq2seq4repair_space>Clusters<seq2seq4repair_space>In:<seq2seq4repair_space>{}<seq2seq4repair_space>Out:<seq2seq4repair_space>{}<seq2seq4repair_space>Distance:<seq2seq4repair_space>{}" , input , clustersIn , output , measure ) ; } ClusterClassifier . writePolicy ( new KMeansClusteringPolicy ( ) , clustersIn ) ; <START_BUG> ClusterClassificationDriver . run ( input , output , new Path ( output , PathDirectory . CLUSTERED_POINTS_DIRECTORY ) , clusterClassificationThreshold , true , runSequential ) ; <END_BUG> } }

Fix:
ClusterClassificationDriver . run ( conf , input , output , new Path ( output , PathDirectory . CLUSTERED_POINTS_DIRECTORY ) , clusterClassificationThreshold , true , runSequential ) ;
Buggy code:
public class LocalDataSourceService extends AbstractDataSourceService { private final InjectedValue < ModifiableDataSource > dataSourceConfig = new InjectedValue < ModifiableDataSource > ( ) ; public LocalDataSourceService ( final String dsName , final String jndiName , final ClassLoader classLoader ) { } public LocalDataSourceService ( final String dsName , final String jndiName ) { } @ Override public AS7DataSourceDeployer getDeployer ( ) throws ValidateException { <START_BUG> return new AS7DataSourceDeployer ( dataSourceConfig . getValue ( ) . getUnModifiableInstance ( ) , dataSourceConfig . getValue ( ) . getProfile ( ) ) ; <END_BUG> } public Injector < ModifiableDataSource > getDataSourceConfigInjector ( ) { } }

Fix:
return new AS7DataSourceDeployer ( dataSourceConfig . getValue ( ) . getUnModifiableInstance ( ) ) ;
Buggy code:
public class BooleanConstant extends Constant { boolean value ; public BooleanConstant ( boolean value ) { } public boolean booleanValue ( ) { } public String stringValue ( ) { <START_BUG> String s = org . eclipse . jdt . internal . compiler . util . Util . valueOf ( value ) . toString ( ) ; <END_BUG> if ( s == null ) return "null" ; else return s ; } public String toString ( ) { } public int typeID ( ) { } }

Fix:
String s = Util . toBoolean ( value ) . toString ( ) ;
Buggy code:
public class DatabaseTesting { BasicDataSource basicDataSource ; DALpug dalpug ; Song testSong ; boolean setupCalled = false ; private void setup ( ) { } public void connectToDatabase ( ) { } public void CreateATable ( ) { } public void CreateandDeleteATable ( ) { } public void AddingSongToDatabase ( ) { } public void GetSongByFromDatabase ( ) { } private void testSongMatch ( Song songReturned , Song testSong , String msg ) { } Song getTestSong ( ) { String fileName = "LooneyToonsEnd.wav" ; String path = ( ( System . getProperty ( "user.dir" ) ) + "\\src\\main\\java\\tempFiles\\" ) + fileName ; byte [ ] songBytes = null ; int size = 0 ; try { File file = new File ( path ) ; InputStream inputStream = new FileInputStream ( file ) ; size = inputStream . available ( ) ; songBytes = new byte [ size ] ; inputStream . read ( songBytes ) ; inputStream . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } <START_BUG> return new Song ( "LooneyToons" , null , "" ) ; <END_BUG> } }

Fix:
return new Song ( "LooneyToons" , null , fileName ) ;
Buggy code:
public class PathConvert extends Task { public class MapEntry { public void setFrom ( String from ) { } public void setTo ( String to ) { } public String apply ( String elem ) { } private String from = null ; private String to = null ; } public Path createPath ( ) { } public PathConvert . MapEntry createMap ( ) { } public void setTargetos ( String target ) { } public void setProperty ( String p ) { } public void setRefid ( Reference r ) { } public void setPathSep ( String sep ) { } public void setDirSep ( String sep ) { } public boolean isReference ( ) { } public void execute ( ) throws BuildException { if ( isReference ( ) ) { path = new Path ( getProject ( ) ) . createPath ( ) ; Object obj = refid . getReferencedObject ( getProject ( ) ) ; if ( obj instanceof Path ) { path . setRefid ( refid ) ; } else if ( obj instanceof FileSet ) { FileSet fs = ( ( FileSet ) ( obj ) ) ; path . addFileset ( fs ) ; } else { throw new BuildException ( "'refid'<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>refer<seq2seq4repair_space>to<seq2seq4repair_space>a<seq2seq4repair_space>path<seq2seq4repair_space>or<seq2seq4repair_space>fileset" ) ; } } validateSetup ( ) ; String osname = System . getProperty ( "os.name" ) . toLowerCase ( ) ; onWindows = ( ( osname . indexOf ( "windows" ) ) >= 0 ) || ( ( osname . indexOf ( "netware" ) ) >= 0 ) ; char fromDirSep = ( onWindows ) ? '\\' : '//' ; char toDirSep = dirSep . charAt ( 0 ) ; StringBuffer rslt = new StringBuffer ( 100 ) ; String [ ] elems = path . list ( ) ; for ( int i = 0 ; i < ( elems . length ) ; i ++ ) { String elem = elems [ i ] ; elem = mapElement ( elem ) ; elem = elem . replace ( fromDirSep , toDirSep ) ; if ( i != 0 ) rslt . append ( pathSep ) ; rslt . append ( elem ) ; } String value = rslt . toString ( ) ; log ( ( ( ( "Set<seq2seq4repair_space>property<seq2seq4repair_space>" + ( property ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + value ) , MSG_VERBOSE ) ; <START_BUG> getProject ( ) . setProperty ( property , value ) ; <END_BUG> } private String mapElement ( String elem ) { } private void validateSetup ( ) throws BuildException { } private BuildException noChildrenAllowed ( ) { } private Path path = null ; private Reference refid = null ; private String targetOS = null ; private boolean targetWindows = false ; private boolean onWindows = false ; private String property = null ; private Vector prefixMap = new Vector ( ) ; private String pathSep = null ; private String dirSep = null ; }

Fix:
getProject ( ) . setNewProperty ( property , value ) ;
Buggy code:
public class TwitterRemoteServiceTest extends AbstractRestTestCase { private String username = System . getProperty ( "username" , "eclipsedummy" ) ; private String password = System . getProperty ( "password" , "eclipse" ) ; IContainer container ; IRemoteServiceRegistration registration ; protected void setUp ( ) throws Exception { container = createRestContainer ( TEST_TWITTER_TARGET ) ; IRemoteServiceClientContainerAdapter adapter = ( ( IRemoteServiceClientContainerAdapter ) ( getRemoteServiceClientContainerAdapter ( container ) ) ) ; adapter . setConnectContextForAuthentication ( ConnectContextFactory . createUsernamePasswordConnectContext ( username , password ) ) ; adapter . setResponseDeserializer ( createRestResource ( ) ) ; IRemoteCallParameter [ ] parameters1 = RemoteCallParameterFactory . createParameters ( "count" , null ) ; IRemoteCallable callable1 = RestCallableFactory . createCallable ( "getUserStatuses" , "//statuses//user_timeline.json" , parameters1 ) ; IRemoteCallParameter [ ] parameters2 = RemoteCallParameterFactory . createParameters ( "body" , null ) ; HttpPostRequestType requestType2 = new HttpPostRequestType ( HttpPostRequestType . STRING_REQUEST_ENTITY ) ; IRemoteCallable callable2 = RestCallableFactory . createCallable ( "postMethodString" , "//statuses//user_timeline.json" , parameters2 , requestType2 ) ; IRemoteCallParameter [ ] parameters3 = RemoteCallParameterFactory . createParameters ( "body" , null ) ; HttpPostRequestType requestType3 = new HttpPostRequestType ( HttpPostRequestType . INPUT_STREAM_REQUEST_ENTITY ) ; IRemoteCallable callable3 = RestCallableFactory . createCallable ( "postMethodInputStream" , "//statuses//user_timeline.json" , parameters3 , requestType3 ) ; <START_BUG> IRemoteCallParameter [ ] parameters4 = RemoteCallParameterFactory . createParameters ( "body" , new byte [ ] { 0 , 0 } ) ; <END_BUG> HttpPostRequestType requestType4 = new HttpPostRequestType ( HttpPostRequestType . BYTEARRAY_REQUEST_ENTITY ) ; IRemoteCallable callable4 = RestCallableFactory . createCallable ( "postMethodByteArray" , "//statuses//user_timeline.json" , parameters4 , requestType4 ) ; registration = adapter . registerCallables ( new String [ ] { IUserTimeline . class . getName ( ) } , new IRemoteCallable [ ] [ ] { new IRemoteCallable [ ] { callable1 , callable2 , callable3 , callable4 } } , null ) ; } protected void tearDown ( ) throws Exception { } private IRemoteResponseDeserializer createRestResource ( ) { } public void testSyncCall ( ) { } public void testSyncCallWithCountParameter ( ) { } public void testSyncCallWithCountParameter1 ( ) { } public void testGetProxy ( ) { } public void testAsyncCall ( ) { } public void testAsyncCallWithListener ( ) throws Exception { } public void testProxyCall ( ) { } }

Fix:
IRemoteCallParameter [ ] parameters4 = RemoteCallParameterFactory . createParameters ( "body" , null ) ;
Buggy code:
public class TestDocBuilder { @ Test public void loadClass ( ) throws Exception { <START_BUG> Class clz = DocBuilder . loadClass ( "RegexTransformer" ) ; <END_BUG> Assert . assertNotNull ( clz ) ; } @ Test public void singleEntityNoRows ( ) { } @ Test public void singleEntityOneRow ( ) { } @ Test public void singleEntityMultipleRows ( ) { } static class SolrWriterImpl extends SolrWriter { List < SolrInputDocument > docs = new ArrayList < SolrInputDocument > ( ) ; Boolean deleteAllCalled ; Boolean commitCalled ; public SolrWriterImpl ( ) { } public SolrDoc getSolrDocInstance ( ) { } public boolean upload ( SolrDoc d ) { } public void log ( int event , String name , Object row ) { } public void doDeleteAll ( ) { } public void commit ( boolean b ) { } } public static final String dc_singleEntity = "<dataConfig>\n" + ( ( ( ( ( ( "<seq2seq4repair_space><document<seq2seq4repair_space>name=\"X\"<seq2seq4repair_space>>\n" + "<seq2seq4repair_space><entity<seq2seq4repair_space>name=\"x\"<seq2seq4repair_space>query=\"select<seq2seq4repair_space>*<seq2seq4repair_space>from<seq2seq4repair_space>x\">\n" ) + "<seq2seq4repair_space><field<seq2seq4repair_space>column=\"id\"//>\n" ) + "<seq2seq4repair_space><field<seq2seq4repair_space>column=\"desc\"//>\n" ) + "<seq2seq4repair_space><//entity>\n" ) + "<seq2seq4repair_space><//document>\n" ) + "<//dataConfig>" ) ; }

Fix:
Class clz = DocBuilder . loadClass ( "RegexTransformer" , null ) ;
Buggy code:
public class MacrosMenu extends EnhancedMenu implements EBComponent { public MacrosMenu ( ) { } public void addNotify ( ) { } public void removeNotify ( ) { } public void handleMessage ( EBMessage msg ) { } public void init ( ) { } private void updateMacrosMenu ( ) { } private void createMacrosMenu ( JMenu menu , Vector vector , int start ) { Vector menuItems = new Vector ( ) ; for ( int i = start ; i < ( vector . size ( ) ) ; i ++ ) { Object obj = vector . elementAt ( i ) ; if ( obj instanceof String ) { <START_BUG> menuItems . add ( new EnhancedMenuItem ( jEdit . getProperty ( ( obj + ".label" ) ) , ( ( String ) ( obj ) ) ) ) ; <END_BUG> } else if ( obj instanceof Vector ) { Vector subvector = ( ( Vector ) ( obj ) ) ; String name = ( ( String ) ( subvector . elementAt ( 0 ) ) ) ; JMenu submenu = new JMenu ( name ) ; createMacrosMenu ( submenu , subvector , 1 ) ; if ( ( submenu . getMenuComponentCount ( ) ) != 0 ) menuItems . add ( submenu ) ; } } Collections . sort ( menuItems , new MiscUtilities . MenuItemCompare ( ) ) ; for ( int i = 0 ; i < ( menuItems . size ( ) ) ; i ++ ) { menu . add ( ( ( JMenuItem ) ( menuItems . get ( i ) ) ) ) ; } } }

Fix:
menuItems . add ( new EnhancedMenuItem ( jEdit . getProperty ( ( obj + ".label" ) ) , ( ( String ) ( obj ) ) , jEdit . getActionContext ( ) ) ) ;
Buggy code:
public class Entities { private StanfordCoreNLP stanfordCoreNLP ; public Entities ( StanfordCoreNLP stanfordCoreNLP ) { } public Set < String > getNamedEntities ( String text ) { Set < String > namedEntities = new HashSet < String > ( ) ; if ( ( text == null ) || ( ( text . trim ( ) . length ( ) ) == 0 ) ) return namedEntities ; Annotation document = new Annotation ( text ) ; this . stanfordCoreNLP . annotate ( document ) ; List < CoreMap > sentences = document . get ( SentencesAnnotation . class ) ; for ( CoreMap sentence : sentences ) { String currentNer = "" ; for ( CoreLabel token : sentence . get ( TokensAnnotation . class ) ) { String word = token . get ( TextAnnotation . class ) ; String namedEntityAnnot = token . get ( NamedEntityTagAnnotation . class ) ; if ( ! ( namedEntityAnnot . equals ( "O" ) ) ) currentNer += "<seq2seq4repair_space>" + word ; else { if ( ! ( currentNer . equals ( "" ) ) ) namedEntities . add ( currentNer ) ; currentNer = "" ; } } <START_BUG> if ( ! ( currentNer . equals ( "O" ) ) ) <END_BUG> namedEntities . add ( currentNer ) ; } return namedEntities ; } }

Fix:
if ( ! ( currentNer . equals ( "" ) ) )
Buggy code:
public class RejectedAppointmentList extends ListFragment { private ArrayList < Appointment > rejectedAppointmentList ; private AppointmentListAdapter mAdapter ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onListItemClick ( ListView l , View v , int position , long id ) { super . onListItemClick ( l , v , position , id ) ; <START_BUG> Intent intent = new Intent ( getActivity ( ) . getApplicationContext ( ) , AppointmentDetailsActivity . class ) ; <END_BUG> Appointment a = this . rejectedAppointmentList . get ( position ) ; intent . putExtra ( "appointmentType" , a . getType ( ) ) ; if ( a . getType ( ) . equalsIgnoreCase ( NORMAL ) ) { intent . putExtra ( "appointment" , a ) ; } else if ( a . getType ( ) . equalsIgnoreCase ( REFERRAL ) ) { intent . putExtra ( "referralAppointment" , ( ( ReferralAppointment ) ( a ) ) ) ; } else if ( a . getType ( ) . equalsIgnoreCase ( FOLLOW_UP ) ) { intent . putExtra ( "followUpAppointment" , ( ( FollowUpAppointment ) ( a ) ) ) ; } startActivity ( intent ) ; } public void fetchList ( ) { } No newline ; at end ; of file ; }

Fix:
Intent intent = new Intent ( getActivity ( ) , AppointmentDetailsActivity . class ) ;
Buggy code:
public class GameServiceProvider { private Map < String , GameService > services = new HashMap < String , GameService > ( ) ; private AtomicReference < GameService > hasAttention = new AtomicReference < GameService > ( ) ; private int attentionCount = 0 ; private boolean freezeTheWorld = false ; private boolean clearTheScreen = false ; private InputMultiplexer inputMultiplexer = new InputMultiplexer ( ) ; private InputMultiplexer attentionInputMultiplexer = new InputMultiplexer ( ) ; private Array < Computable > computables = new Array < Computable > ( ) ; private Array < Drawable > drawables = new Array < Drawable > ( ) ; private Array < ResizeListener > resizeListener = new Array < ResizeListener > ( ) ; public GameServiceProvider ( ) { } public GameService getService ( String name ) { } @ SuppressWarnings ( "unchecked" ) public < T extends GameService > T getService ( Class < T > clazz , String name ) { } @ SuppressWarnings ( "unchecked" ) public < T extends GameService > Array < T > getServices ( Class < T > clazz ) { } public GameService putServiceBefore ( String name , GameService service , String referenceService ) { } public GameService putServiceAfter ( String name , GameService service , String referenceService ) { } private GameService putServiceRelativeTo ( String name , GameService service , String referenceService , int offset ) { } private < T > void shiftPos ( Array < T > array , T service , T ref , int offset ) { } public GameService putService ( String name , GameService service ) { } public GameService removeService ( String name ) { } public boolean requestAttention ( GameService service , boolean freezeTheWorld , boolean clearTheScreen ) { if ( ( hasAttention . get ( ) ) == service ) { ( attentionCount ) ++ ; return true ; } boolean succeed = hasAttention . compareAndSet ( null , service ) ; if ( succeed ) { ( attentionCount ) ++ ; this . freezeTheWorld = freezeTheWorld ; this . clearTheScreen = clearTheScreen ; attentionInputMultiplexer . clear ( ) ; boolean found = false ; for ( InputProcessor in : inputMultiplexer . getProcessors ( ) ) { if ( in == service ) { attentionInputMultiplexer . addProcessor ( in ) ; found = true ; } else if ( ( ( GameService ) ( in ) ) . essential ( ) ) { attentionInputMultiplexer . addProcessor ( in ) ; } } <START_BUG> if ( ! found ) { <END_BUG> attentionInputMultiplexer . addProcessor ( ( ( InputProcessor ) ( service ) ) ) ; } if ( freezeTheWorld ) { for ( GameService s : services . values ( ) ) { if ( ( s != service ) && ( ! ( s . essential ( ) ) ) ) s . freeze ( ) ; } } input . setInputProcessor ( attentionInputMultiplexer ) ; } return succeed ; } public boolean releaseAttention ( GameService service ) { } public GameService queryAttention ( ) { } public void dispose ( ) { } void computeAll ( ) { } void drawAll ( boolean debug ) { } void resize ( int width , int height ) { } private Matrix4 drawWithMatrix ( boolean debug , SpriteBatch spriteBatch , Camera camera , Matrix4 old , Drawable d , float tintColorBits ) { } }

Fix:
if ( ( ! found ) && ( service instanceof InputProcessor ) ) {
Buggy code:
public class ConfigFrame implements ActionListener , ListSelectionListener { private JDialog dialog ; private Config config ; private IdentityPanel identityPanel ; private IncomingServerPanel incomingPanel ; private OutgoingServerPanel outgoingServerPanel ; private boolean newAccount = false ; private AccountListTable listView ; private AccountList accountList ; private AccountItem accountItem ; JPanel eastPanel = new JPanel ( ) ; JPanel jPanel1 = new JPanel ( ) ; JTextField nameTextField = new JTextField ( ) ; JLabel nameLabel = new JLabel ( ) ; JButton addButton = new JButton ( ) ; HelpButton helpButton ; CloseButton closeButton ; JButton removeButton = new JButton ( ) ; JButton editButton = new JButton ( ) ; private int index ; public ConfigFrame ( ) { } public AccountItem getSelected ( ) { } public void setSelected ( AccountItem item ) { } public void initComponents ( ) { } protected JPanel createButtonPanel ( ) { } public void valueChanged ( ListSelectionEvent e ) { } public void showAccountDialog ( ) { } public void actionPerformed ( ActionEvent e ) { String action = e . getActionCommand ( ) ; if ( action . equals ( "CLOSE" ) ) { try { Config . save ( ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } dialog . setVisible ( false ) ; } else if ( action . equals ( "ADD" ) ) { System . out . println ( MailResourceLoader . getString ( "dialog" , "account" , "add" ) ) ; <START_BUG> AccountWizard wizard = new AccountWizard ( true ) ; <END_BUG> listView . update ( ) ; } else if ( action . equals ( "REMOVE" ) ) { System . out . println ( MailResourceLoader . getString ( "dialog" , "account" , "remove" ) ) ; AccountItem item = accountList . remove ( index ) ; if ( ( item . isPopAccount ( ) ) == true ) { popServerCollection . removePopServer ( item . getUid ( ) ) ; frameModel . updatePop3Menu ( ) ; } else { Folder folder = ( ( Folder ) ( treeModel . getImapFolder ( item . getUid ( ) ) ) ) ; folder . removeFromParent ( ) ; } removeButton . setEnabled ( false ) ; editButton . setEnabled ( false ) ; listView . update ( ) ; } else if ( action . equals ( "EDIT" ) ) { showAccountDialog ( ) ; listView . update ( ) ; } } public class WizardTopBorder extends AbstractBorder { protected Insets borderInsets = new Insets ( 2 , 0 , 0 , 0 ) ; public void paintBorder ( Component c , Graphics g , int x , int y , int w , int h ) { } public Insets getBorderInsets ( Component c ) { } } }

Fix:
AccountWizard wizard = new AccountWizard ( false ) ;
Buggy code:
public class command implements CommandExecutor { private Main main ; public command ( Main main ) { } public boolean onCommand ( CommandSender sender , Command command , String label , String [ ] args ) { } private void ReloadPermissionEffects ( ) { ArrayList < PotionEffectTypes > possibleEffects = new ArrayList < PotionEffectTypes > ( ) ; Collections . addAll ( possibleEffects , PotionEffectTypes . values ( ) ) ; ArrayList < Integer > strengh = new ArrayList < Integer > ( ) ; strengh . add ( 1 ) ; strengh . add ( 2 ) ; strengh . add ( 3 ) ; strengh . add ( 4 ) ; for ( Player player : main . getServer ( ) . getOnlinePlayers ( ) ) { for ( PotionEffectTypes types : possibleEffects ) { player . removePotionEffect ( PotionEffectType . getByName ( types . toString ( ) ) ) ; } } for ( Player player : main . getServer ( ) . getOnlinePlayers ( ) ) { <START_BUG> if ( ( ! ( player . hasPermission ( "pe.bypass" ) ) ) || ( player . isOp ( ) ) ) { <END_BUG> for ( PotionEffectTypes effect : possibleEffects ) { if ( player . hasPermission ( ( "pe." + ( effect . toString ( ) . toLowerCase ( ) ) ) ) ) { for ( Integer integer : strengh ) { if ( player . hasPermission ( ( ( ( "pe." + ( effect . toString ( ) . toLowerCase ( ) ) ) + "." ) + ( integer . toString ( ) ) ) ) ) { player . addPotionEffect ( new org . bukkit . potion . PotionEffect ( PotionEffectType . getByName ( effect . toString ( ) ) , 100000000 , ( integer - 1 ) , false , false ) ) ; } } player . addPotionEffect ( new org . bukkit . potion . PotionEffect ( PotionEffectType . getByName ( effect . toString ( ) ) , 1000000000 , 0 , false , false ) ) ; } } } } } private String header ( String s ) { } private String footer ( ) { } }

Fix:
if ( ( ! ( player . hasPermission ( "pe.bypass" ) ) ) || ( ! ( player . isOp ( ) ) ) ) {
Buggy code:
public class PropertiesProvider extends AbstractProvider { private Map idToElement = new HashMap ( ) ; public AbstractElement getElementForId ( String id ) { } public AbstractElement [ ] getElements ( ) { idToElement . clear ( ) ; IWorkbenchPage activePage = PlatformUI . getWorkbench ( ) . getActiveWorkbenchWindow ( ) . getActivePage ( ) ; if ( activePage != null ) { PropertyPageManager pageManager = new PropertyPageManager ( ) ; ISelection selection = activePage . getSelection ( ) ; <START_BUG> if ( ( ! ( selection . isEmpty ( ) ) ) && ( selection instanceof IStructuredSelection ) ) { <END_BUG> Object element = ( ( IStructuredSelection ) ( selection ) ) . getFirstElement ( ) ; PropertyPageContributorManager . getManager ( ) . contribute ( pageManager , element ) ; List list = pageManager . getElements ( PRE_ORDER ) ; IPreferenceNode [ ] properties = ( ( IPreferenceNode [ ] ) ( list . toArray ( new IPreferenceNode [ list . size ( ) ] ) ) ) ; for ( int i = 0 ; i < ( properties . length ) ; i ++ ) { PropertiesElement propertiesElement = new PropertiesElement ( element , properties [ i ] , this ) ; idToElement . put ( propertiesElement . getId ( ) , propertiesElement ) ; } } } return ( ( AbstractElement [ ] ) ( idToElement . values ( ) . toArray ( new AbstractElement [ idToElement . values ( ) . size ( ) ] ) ) ) ; } public String getId ( ) { } public ImageDescriptor getImageDescriptor ( ) { } public String getName ( ) { } }

Fix:
if ( ( selection instanceof IStructuredSelection ) && ( ! ( selection . isEmpty ( ) ) ) ) {
Buggy code:
public class TestConverter1 implements Converter { <START_BUG> public Object convert ( Class destination , Object original , Context context ) throws ConverterException { <END_BUG> return new TestType1 ( ) ; } }

Fix:
public Object convert ( Class destination , Object original , Object context ) throws ConverterException {
Buggy code:
public class IndexInstancesMapper extends Mapper < Text , VectorWritable , IntWritable , VectorWritable > { public enum Counter { SKIPPED_INSTANCES ; } private OpenObjectIntHashMap < String > labelIndex ; @ Override protected void setup ( Context ctx ) throws IOException , InterruptedException { } @ Override protected void map ( Text labelText , VectorWritable instance , Context ctx ) throws IOException , InterruptedException { <START_BUG> String label = labelText . toString ( ) ; <END_BUG> if ( labelIndex . containsKey ( label ) ) { ctx . write ( new IntWritable ( labelIndex . get ( label ) ) , instance ) ; } else { ctx . getCounter ( IndexInstancesMapper . Counter . SKIPPED_INSTANCES ) . increment ( 1 ) ; } } }

Fix:
String label = labelText . toString ( ) . split ( "//" ) [ 1 ] ;
Buggy code:
public class TestStopAnalyzer extends BaseTokenStreamTestCase { private StopAnalyzer stop = new StopAnalyzer ( TEST_VERSION_CURRENT ) ; private Set < Object > inValidTokens = new HashSet < Object > ( ) ; @ Override public void setUp ( ) throws Exception { } public void testDefaults ( ) throws IOException { } public void testStopList ( ) throws IOException { CharArraySet stopWordsSet = new CharArraySet ( TEST_VERSION_CURRENT , asSet ( "good" , "test" , "analyzer" ) , false ) ; <START_BUG> StopAnalyzer newStop = new StopAnalyzer ( Version . LUCENE_40 , stopWordsSet ) ; <END_BUG> try ( TokenStream stream = newStop . tokenStream ( "test" , "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>good<seq2seq4repair_space>test<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>english<seq2seq4repair_space>stop<seq2seq4repair_space>analyzer" ) ) { assertNotNull ( stream ) ; CharTermAttribute termAtt = stream . getAttribute ( CharTermAttribute . class ) ; stream . reset ( ) ; while ( stream . incrementToken ( ) ) { String text = termAtt . toString ( ) ; assertFalse ( stopWordsSet . contains ( text ) ) ; } stream . end ( ) ; } } public void testStopListPositions ( ) throws IOException { } }

Fix:
StopAnalyzer newStop = new StopAnalyzer ( TEST_VERSION_CURRENT , stopWordsSet ) ;
Buggy code:
public class JarEntryFile extends PlatformObject implements IStorage { private String entryName ; private String zipName ; private IPath path ; public JarEntryFile ( String entryName , String zipName ) { } public InputStream getContents ( ) throws CoreException { try { if ( JavaModelManager . ZIP_ACCESS_VERBOSE ) { <START_BUG> System . out . println ( ( "[JavaModelJarEntryFile.getContents()]<seq2seq4repair_space>Creating<seq2seq4repair_space>ZipFile<seq2seq4repair_space>on<seq2seq4repair_space>" + ( this . zipName ) ) ) ; <END_BUG> } ZipFile zipFile = new ZipFile ( this . zipName ) ; ZipEntry zipEntry = zipFile . getEntry ( this . entryName ) ; if ( zipEntry == null ) { throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . INVALID_PATH , this . entryName ) ) ; } return zipFile . getInputStream ( zipEntry ) ; } catch ( IOException e ) { throw new JavaModelException ( e , IJavaModelStatusConstants . IO_EXCEPTION ) ; } } public IPath getFullPath ( ) { } public String getName ( ) { } public boolean isReadOnly ( ) { } public String toString ( ) { } }

Fix:
System . out . println ( ( ( ( "(" + ( Thread . currentThread ( ) ) ) + ")<seq2seq4repair_space>[JarEntryFile.getContents()]<seq2seq4repair_space>Creating<seq2seq4repair_space>ZipFile<seq2seq4repair_space>on<seq2seq4repair_space>" ) + ( this . zipName ) ) ) ;