nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CompilationUnitScope extends Scope { public LookupEnvironment environment ; public CompilationUnitDeclaration referenceContext ; public char [ ] [ ] currentPackageName ; public PackageBinding fPackage ; public ImportBinding [ ] imports ; public HashtableOfObject resolvedSingeTypeImports ; public SourceTypeBinding [ ] topLevelTypes ; private CompoundNameVector qualifiedReferences ; private SimpleNameVector simpleNameReferences ; private ObjectVector referencedTypes ; private ObjectVector referencedSuperTypes ; HashtableOfType constantPoolNameUsage ; public CompilationUnitScope ( CompilationUnitDeclaration unit , LookupEnvironment environment ) { } void buildFieldsAndMethods ( ) { } void buildTypeBindings ( AccessRestriction accessRestriction ) { } void checkAndSetImports ( ) { } public char [ ] computeConstantPoolName ( LocalTypeBinding localType ) { } void connectTypeHierarchy ( ) { } void faultInImports ( ) { } public void faultInTypes ( ) { } private Binding findImport ( char [ ] [ ] compoundName , int length ) { } private Binding findSingleImport ( char [ ] [ ] compoundName , boolean findStaticImports ) { } private Binding findSingleStaticImport ( char [ ] [ ] compoundName ) { } ImportBinding [ ] getDefaultImports ( ) { } public final Binding getImport ( char [ ] [ ] compoundName , boolean onDemand , boolean isStaticImport ) { } public ProblemReporter problemReporter ( ) { } void recordQualifiedReference ( char [ ] [ ] qualifiedName ) { } void recordReference ( char [ ] [ ] qualifiedEnclosingName , char [ ] simpleName ) { } void recordReference ( ReferenceBinding type , char [ ] simpleName ) { } void recordSimpleReference ( char [ ] simpleName ) { } void recordSuperTypeReference ( TypeBinding type ) { } public void recordTypeConversion ( TypeBinding superType , TypeBinding subType ) { } void recordTypeReference ( TypeBinding type ) { } void recordTypeReferences ( TypeBinding [ ] types ) { } Binding resolveSingleImport ( ImportBinding importBinding ) { } public void storeDependencyInfo ( ) { } public String toString ( ) { } private ReferenceBinding typeToRecord ( TypeBinding type ) { if ( type . isArrayType ( ) ) type = ( ( ArrayBinding ) ( type ) ) . leafComponentType ; <START_BUG> switch ( type . bindingType ( ) ) { <END_BUG> case Binding . TYPE_PARAMETER : case Binding . WILDCARD_TYPE : return null ; case Binding . PARAMETERIZED_TYPE : case Binding . RAW_TYPE : type = type . erasure ( ) ; } if ( type instanceof ReferenceBinding ) { ReferenceBinding refType = ( ( ReferenceBinding ) ( type ) ) ; if ( ! ( refType . isLocalType ( ) ) ) return refType ; } return null ; } public void verifyMethods ( MethodVerifier verifier ) { } }

Fix:
switch ( type . kind ( ) ) {
Buggy code:
public class Enemy extends Living { private ViewMap viewed ; private Tile target ; public Enemy ( ) { } public boolean plan ( ) { } public void addToView ( VPoint pos , int flag ) { } public int getVisibilityLevel ( VPoint pos ) { } public void lookAround ( ) { } public boolean seekPlayer ( ) { } @ Override public boolean step ( VPoint dir ) { } @ Override public Damage getDmg ( ) { <START_BUG> return new Damage ( 2 , Reference . PHYS_DMG , accuracy ) ; <END_BUG> } @ Override public String toString ( ) { } @ Override public int getLivingClass ( ) { } }

Fix:
return new Damage ( 10 , Reference . PHYS_DMG , accuracy ) ;
Buggy code:
public class TF_IDF_Calculator { public int calculateTF ( String [ ] document , String wordToCheck ) { } public double calculateIDF ( List < String [ ] > documents , String wordToCheck ) { double count = 0 ; for ( String [ ] ss : documents ) { for ( String s : ss ) { if ( s . equalsIgnoreCase ( wordToCheck ) ) { count ++ ; break ; } } } <START_BUG> return 1 + ( Math . log ( ( ( documents . size ( ) ) // count ) ) ) ; <END_BUG> } public ArrayList < Double [ ] > calculateTF_IDF_valueOfAllDocuments ( List < String [ ] > documents ) { } }

Fix:
return Math . log ( ( ( ( documents . size ( ) ) // 1 ) + count ) ) ;
Buggy code:
public class Episode1 implements GameObject , LevelSet { private Game game ; private String [ ] levels = new String [ ] { "level.txt" , "level2.txt" , "level3.txt" , "level4.txt" , "level5.txt" , "level6.txt" , "level7.txt" , "level9.txt" , "level10.txt" , "level11.txt" } ; private int level ; private int size_y ; private int width ; private int height ; public Episode1 ( Game game , int level ) { } @ Override public InputStream getLevel ( ) { } @ Override public boolean nextLevel ( ) { } @ Override public LevelSet nextLevelSet ( ) { } @ Override public void onLevelStarts ( ) { if ( ( level ) == 0 ) { game . getMenu ( ) . showScreen ( getClass ( ) . getResourceAsStream ( "//res//story0.txt" ) ) ; } <START_BUG> if ( ( level ) == 10 ) { <END_BUG> game . getGameObjects ( ) . add ( this ) ; game . getPlayer ( ) . addEvil ( ) ; } } @ Override public int getLevelNum ( ) { } @ Override public boolean calc ( float time ) { } @ Override public boolean paint ( Graphics g ) { } @ Override public boolean reset ( ) { } @ Override public boolean isColidate ( Rectangle r ) { } @ Override public boolean destroyColidate ( Rectangle r ) { } @ Override public void drawBackground ( Graphics g ) { } @ Override public int getType ( ) { } @ Override public void changeDest ( Rectangle r ) { } @ Override public int getCons ( ) { } @ Override public boolean isScore ( ) { } @ Override public Color getFontColor ( ) { } }

Fix:
if ( ( level ) == 9 ) {
Buggy code:
public class StoryWebService extends ProjectWebService { private ConvertProductBacklog mConvertProductBacklog ; private ProductBacklogHelper mProductBacklogHelper ; private SprintBacklogHelper mSprintBacklogHelper ; public StoryWebService ( AccountObject user , String projectID ) throws LogonException { } public StoryWebService ( String username , String userpwd , String projectID ) throws LogonException { } private void initialize ( ) { } public String createStory ( String storyJson ) throws JSONException { } public String updateStory ( String storyJson ) throws SQLException { } public String getTaskInStory ( String storyId ) { } public void addExistedTask ( String storyId , String taskIdsJson ) { Gson gson = new Gson ( ) ; String [ ] taskIds = gson . fromJson ( taskIdsJson , String [ ] . class ) ; <START_BUG> mSprintBacklogHelper . addExistingTask ( taskIds , Long . parseLong ( storyId ) ) ; <END_BUG> } }

Fix:
mSprintBacklogHelper . addExistingTasksToStory ( taskIds , Long . parseLong ( storyId ) ) ;
Buggy code:
abstract class Lexer { private static final char DISABLED = '￾' ; private final char delimiter ; private final char escape ; private final char quoteChar ; private final char commmentStart ; final boolean ignoreSurroundingSpaces ; final boolean ignoreEmptyLines ; final CSVFormat format ; final ExtendedBufferedReader in ; Lexer ( final CSVFormat format , final ExtendedBufferedReader in ) { } private final char mapNullToDisabled ( final Character c ) { } long getLineNumber ( ) { } int readEscape ( ) throws IOException { } void trimTrailingSpaces ( final StringBuilder buffer ) { } boolean readEndOfLine ( int c ) throws IOException { } abstract Token nextToken ( Token reusableToken ) throws IOException { } boolean isWhitespace ( final int c ) { <START_BUG> return ( c != ( format . getDelimiter ( ) ) ) && ( Character . isWhitespace ( ( ( char ) ( c ) ) ) ) ; <END_BUG> } boolean isStartOfLine ( final int c ) { } boolean isEndOfFile ( final int c ) { } boolean isDelimiter ( final int c ) { } boolean isEscape ( final int c ) { } boolean isQuoteChar ( final int c ) { } boolean isCommentStart ( final int c ) { } }

Fix:
return ( ! ( isDelimiter ( c ) ) ) && ( Character . isWhitespace ( ( ( char ) ( c ) ) ) ) ;
Buggy code:
public class PackageTest extends TestCase { private static PropertyResourceBundle defaultPRB ; private PropertyResourceBundle getRAS ( String res ) throws Exception { } private void readRF ( String res , List l ) throws Exception { InputStream ras = this . getClass ( ) . getResourceAsStream ( res ) ; BufferedReader fileReader = new BufferedReader ( new InputStreamReader ( ras ) ) ; String s ; while ( ( s = fileReader . readLine ( ) ) != null ) { <START_BUG> if ( ( s . length ( ) ) > 0 ) { <END_BUG> l . add ( s . substring ( 0 , s . indexOf ( '=' ) ) ) ; } } } private static String getResName ( String lang ) { } private void check ( String resname ) throws Exception { } public static Test suite ( ) { } private int subTestFailures ; public PackageTest ( String string ) { } public void atestDE ( ) throws Exception { } public void atestJA ( ) throws Exception { } public void atestNO ( ) throws Exception { } public void atestDefault ( ) throws Exception { } }

Fix:
if ( ( ( s . length ( ) ) > 0 ) && ( ! ( s . startsWith ( "#" ) ) ) ) {
Buggy code:
public class SessionBasedSessionPassivationTestCase extends SessionPassivationAbstractCase { @ Deployment ( name = DEPLOYMENT_1 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_1 ) public static Archive < ? > deployment0 ( ) { } @ Deployment ( name = DEPLOYMENT_2 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_2 ) public static Archive < ? > deployment1 ( ) { } private static Archive < ? > createDeployment ( ) { WebArchive war = ShrinkWrap . create ( WebArchive . class , "passivating-session.war" ) ; war . addClass ( SimpleServlet . class ) ; war . setWebXML ( ClusteredWebSimpleTestCase . class . getPackage ( ) , "web.xml" ) ; war . addAsWebInfResource ( SessionPassivationAbstractCase . class . getPackage ( ) , "jboss-web_passivation_session.xml" , "jboss-web.xml" ) ; <START_BUG> System . out . println ( war . toString ( true ) ) ; <END_BUG> return war ; } }

Fix:
log . info ( war . toString ( true ) ) ;
Buggy code:
public class GillIntegratorTest { @ Test ( expected = DimensionMismatchException . class ) public void testDimensionCheck ( ) { } @ Test public void testDecreasingSteps ( ) { TestProblemAbstract [ ] problems = TestProblemFactory . getProblems ( ) ; for ( int k = 0 ; k < ( problems . length ) ; ++ k ) { double previousValueError = Double . NaN ; double previousTimeError = Double . NaN ; for ( int i = 5 ; i < 10 ; ++ i ) { TestProblemAbstract pb = problems [ k ] . copy ( ) ; double step = ( ( pb . getFinalTime ( ) ) - ( pb . getInitialTime ( ) ) ) * ( FastMath . pow ( 2.0 , ( - i ) ) ) ; FirstOrderIntegrator integ = new GillIntegrator ( step ) ; TestProblemHandler handler = new TestProblemHandler ( pb , integ ) ; integ . addStepHandler ( handler ) ; EventHandler [ ] functions = pb . getEventsHandlers ( ) ; for ( int l = 0 ; l < ( functions . length ) ; ++ l ) { integ . addEventHandler ( functions [ l ] , Double . POSITIVE_INFINITY , ( 1.0E-6 * step ) , 1000 ) ; } double stopTime = integ . integrate ( pb , pb . getInitialTime ( ) , pb . getInitialState ( ) , pb . getFinalTime ( ) , new double [ pb . getDimension ( ) ] ) ; if ( ( functions . length ) == 0 ) { Assert . assertEquals ( pb . getFinalTime ( ) , stopTime , 1.0E-10 ) ; } double valueError = handler . getMaximalValueError ( ) ; if ( i > 5 ) { <START_BUG> Assert . assertTrue ( ( valueError < ( FastMath . abs ( previousValueError ) ) ) ) ; <END_BUG> } previousValueError = valueError ; double timeError = handler . getMaximalTimeError ( ) ; if ( i > 5 ) { Assert . assertTrue ( ( timeError <= ( FastMath . abs ( previousTimeError ) ) ) ) ; } previousTimeError = timeError ; } } } @ Test public void testSmallStep ( ) { } @ Test public void testBigStep ( ) { } @ Test public void testBackward ( ) { } @ Test public void testKepler ( ) { } @ Test public void testUnstableDerivative ( ) { } private static class KeplerStepHandler implements StepHandler { public KeplerStepHandler ( TestProblem3 pb ) { } public void reset ( ) { } public void handleStep ( StepInterpolator interpolator , boolean isLast ) { } private double maxError ; private TestProblem3 pb ; } @ Test public void testStepSize ( ) { } }

Fix:
Assert . assertTrue ( ( valueError < ( 1.01 * ( FastMath . abs ( previousValueError ) ) ) ) ) ;
Buggy code:
public class InvocableHandlerMethod extends HandlerMethod { private HandlerMethodArgumentResolverComposite argumentResolvers = new HandlerMethodArgumentResolverComposite ( ) ; private WebDataBinderFactory dataBinderFactory ; private ParameterNameDiscoverer parameterNameDiscoverer = new LocalVariableTableParameterNameDiscoverer ( ) ; public InvocableHandlerMethod ( Object bean , Method method ) { } public InvocableHandlerMethod ( Object bean , String methodName , Class < ? > ... parameterTypes ) throws NoSuchMethodException { } public void setDataBinderFactory ( WebDataBinderFactory dataBinderFactory ) { } public void setHandlerMethodArgumentResolvers ( HandlerMethodArgumentResolverComposite argumentResolvers ) { } public void setParameterNameDiscoverer ( ParameterNameDiscoverer parameterNameDiscoverer ) { } public final Object invokeForRequest ( NativeWebRequest request , ModelAndViewContainer mavContainer , Object ... providedArgs ) throws Exception { } private Object [ ] getMethodArgumentValues ( NativeWebRequest request , ModelAndViewContainer mavContainer , Object ... providedArgs ) throws Exception { } private Object resolveProvidedArgument ( MethodParameter parameter , Object ... providedArgs ) { <START_BUG> if ( providedArgs == null ) { <END_BUG> return null ; } for ( Object providedArg : providedArgs ) { if ( parameter . getParameterType ( ) . isInstance ( providedArg ) ) { return providedArg ; } } return null ; } private Object invoke ( Object ... args ) throws Exception { } private void handleIllegalArgumentException ( IllegalArgumentException ex , Object ... args ) { } private void handleInvocationTargetException ( InvocationTargetException ex ) throws Exception { } }

Fix:
if ( ( providedArgs == null ) || ( parameter . hasParameterAnnotations ( ) ) ) {
Buggy code:
class ImportDeclaration extends SourceRefElement implements IImportDeclaration { protected ImportDeclaration ( ImportContainer parent , String name ) { } public boolean equals ( Object o ) { } protected boolean equalsDOMNode ( IDOMNode node ) { } public int getElementType ( ) { } public int getFlags ( ) throws JavaModelException { } public String getHandleMemento ( ) { } protected char getHandleMementoDelimiter ( ) { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { CompilationUnit cu = ( ( CompilationUnit ) ( fParent . getParent ( ) ) ) ; <START_BUG> if ( checkOwner && ( ( cu . owner ) == ( DefaultWorkingCopyOwner . PRIMARY ) ) ) <END_BUG> return this ; return cu . getImport ( fName ) ; } public boolean isOnDemand ( ) { } public String readableName ( ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } }

Fix:
if ( checkOwner && ( cu . isPrimary ( ) ) )
Buggy code:
public final class CompoundFileDirectory extends Directory { public static final class FileEntry { long offset ; long length ; } private final Directory directory ; private final String fileName ; protected final int readBufferSize ; private final Map < String , CompoundFileDirectory . FileEntry > entries ; private final boolean openForWrite ; private static final Map < String , CompoundFileDirectory . FileEntry > SENTINEL = Collections . emptyMap ( ) ; private final CompoundFileWriter writer ; private final IndexInputSlicer handle ; public CompoundFileDirectory ( Directory directory , String fileName , IOContext context , boolean openForWrite ) throws IOException { } private static final Map < String , CompoundFileDirectory . FileEntry > readEntries ( IndexInputSlicer handle , Directory dir , String name ) throws IOException { } private static Map < String , CompoundFileDirectory . FileEntry > readLegacyEntries ( IndexInput stream , int firstInt ) throws IOException , CorruptIndexException { } public Directory getDirectory ( ) { } public String getName ( ) { } @ Override public synchronized void close ( ) throws IOException { } @ Override public synchronized IndexInput openInput ( String name , IOContext context ) throws IOException { } @ Override public String [ ] listAll ( ) { ensureOpen ( ) ; String [ ] res ; if ( ( writer ) != null ) { res = writer . listAll ( ) ; } else { res = entries . keySet ( ) . toArray ( new String [ entries . size ( ) ] ) ; <START_BUG> String seg = fileName . substring ( 0 , fileName . indexOf ( '.' ) ) ; <END_BUG> for ( int i = 0 ; i < ( res . length ) ; i ++ ) { res [ i ] = seg + ( res [ i ] ) ; } } return res ; } @ Override public boolean fileExists ( String name ) { } @ Override public void deleteFile ( String name ) { } public void renameFile ( String from , String to ) { } @ Override public long fileLength ( String name ) throws IOException { } @ Override public IndexOutput createOutput ( String name , IOContext context ) throws IOException { } @ Override public void sync ( Collection < String > names ) throws IOException { } @ Override public Lock makeLock ( String name ) { } @ Override public IndexInputSlicer createSlicer ( final String name , IOContext context ) throws IOException { } @ Override public String toString ( ) { } }

Fix:
String seg = IndexFileNames . parseSegmentName ( fileName ) ;
Buggy code:
public class Scale extends Control { public Scale ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( int index ) { } void hookEvents ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } int gtk_value_changed ( int adjustment ) { <START_BUG> postEvent ( Selection ) ; <END_BUG> return 0 ; } public void removeSelectionListener ( SelectionListener listener ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } }

Fix:
sendSelectionEvent ( Selection ) ;
Buggy code:
public class MasterWorkerThread extends Thread { private static Logger log = Logger . getLogger ( MasterWorkerThread . class ) ; private final ServerLink serverLink ; private final MasterServer masterServer ; public MasterWorkerThread ( MasterServer masterServer , ServerLink serverLink ) { } public void run ( ) { try { while ( true ) { Object clientRequest = serverLink . read ( ) ; MasterWorkerThread . log . debug ( ( "Got<seq2seq4repair_space>clientRequest<seq2seq4repair_space>" + clientRequest ) ) ; if ( ( ! ( clientRequest instanceof HealthMessage ) ) && ( ! ( clientRequest instanceof JobProgressMessage ) ) ) MasterWorkerThread . log . debug ( ( ( "Message<seq2seq4repair_space>recieved<seq2seq4repair_space>from<seq2seq4repair_space>worker<seq2seq4repair_space>'" + ( clientRequest . getClass ( ) . getSimpleName ( ) ) ) + "'" ) ) ; if ( clientRequest instanceof PingMessage ) { serverLink . write ( new PongMessage ( ) ) ; } else if ( clientRequest instanceof RegistrationMessage ) { RegistrationMessage registrationMessage = ( ( RegistrationMessage ) ( clientRequest ) ) ; masterServer . registerWorker ( registrationMessage . getKnownClasses ( ) , serverLink ) ; } else if ( clientRequest instanceof HealthMessage ) { HealthMessage healthMessage = ( ( HealthMessage ) ( clientRequest ) ) ; masterServer . updateWorkerHealth ( healthMessage , serverLink ) ; } else if ( clientRequest instanceof JobProgressMessage ) { JobProgressMessage jobProgressMessage = ( ( JobProgressMessage ) ( clientRequest ) ) ; masterServer . updateJobProgress ( jobProgressMessage ) ; } else if ( clientRequest instanceof RunMethodRemoteResultMessage ) { RunMethodRemoteResultMessage runMethodRemoteResultMessage = ( ( RunMethodRemoteResultMessage ) ( clientRequest ) ) ; masterServer . setRunMethodRemoteResultMessage ( runMethodRemoteResultMessage ) ; } else if ( clientRequest instanceof JobResultMessage ) { JobResultMessage jobResultMessage = ( ( JobResultMessage ) ( clientRequest ) ) ; <START_BUG> masterServer . setResult ( jobResultMessage ) ; <END_BUG> } else { MasterWorkerThread . log . warn ( ( "Don't<seq2seq4repair_space>know<seq2seq4repair_space>message<seq2seq4repair_space>from<seq2seq4repair_space>worker<seq2seq4repair_space>=<seq2seq4repair_space>" + clientRequest ) ) ; } } } catch ( ClosedChannelException e ) { MasterWorkerThread . log . info ( "Connection<seq2seq4repair_space>closed<seq2seq4repair_space>-<seq2seq4repair_space>stopping<seq2seq4repair_space>listening<seq2seq4repair_space>to<seq2seq4repair_space>worker" ) ; } catch ( IOException e ) { MasterWorkerThread . log . error ( "IOException<seq2seq4repair_space>-<seq2seq4repair_space>stopping<seq2seq4repair_space>listening<seq2seq4repair_space>to<seq2seq4repair_space>worker" , e ) ; } finally { masterServer . unregisterWorker ( serverLink ) ; } } }

Fix:
masterServer . setResult ( jobResultMessage , serverLink ) ;
Buggy code:
public class ContentTest extends AbstractTasklet { public void addContent ( final Integer value ) { <START_BUG> getLogger ( ) . info ( ( "Integer<seq2seq4repair_space>content:<seq2seq4repair_space>" + value ) ) ; <END_BUG> } public void run ( ) throws AntException { } }

Fix:
getLogger ( ) . warn ( ( "Integer<seq2seq4repair_space>content:<seq2seq4repair_space>" + value ) ) ;
Buggy code:
public final class RubyArguments { public static final int METHOD_INDEX = 0 ; public static final int DECLARATION_FRAME_INDEX = 1 ; public static final int SELF_INDEX = 2 ; public static final int BLOCK_INDEX = 3 ; public static final int RUNTIME_ARGUMENT_COUNT = 4 ; public static Object [ ] pack ( InternalMethod method , MaterializedFrame declarationFrame , Object self , RubyBasicObject block , Object [ ] arguments ) { } public static Object getOptimizedKeywordArgument ( Object [ ] arguments , int index ) { } public static boolean isKwOptimized ( Object [ ] arguments ) { } public static InternalMethod getMethod ( Object [ ] arguments ) { } public static Object getSelf ( Object [ ] arguments ) { } public static RubyBasicObject getBlock ( Object [ ] arguments ) { } public static Object [ ] extractUserArguments ( Object [ ] arguments ) { } public static Object [ ] extractUserArgumentsFrom ( Object [ ] arguments , int start ) { } public static Object [ ] extractUserArgumentsWithUnshift ( Object first , Object [ ] arguments ) { } public static int getUserArgumentsCount ( Object [ ] internalArguments ) { } public static int getNamedUserArgumentsCount ( Object [ ] internalArguments ) { if ( RubyArguments . isKwOptimized ( internalArguments ) ) { <START_BUG> return ( ( RubyArguments . getUserArgumentsCount ( internalArguments ) ) - ( RubyArguments . getMethod ( internalArguments ) . getSharedMethodInfo ( ) . getArity ( ) . getKeywordArguments ( ) . size ( ) ) ) - 1 ; <END_BUG> } else { return RubyArguments . getUserArgumentsCount ( internalArguments ) ; } } public static Object getUserArgument ( Object [ ] internalArguments , int index ) { } public static void setUserArgument ( Object [ ] internalArguments , int index , Object value ) { } public static RubyBasicObject getUserKeywordsHash ( Object [ ] internalArguments , int minArgumentCount ) { } public static MaterializedFrame getDeclarationFrame ( Object [ ] arguments ) { } public static MaterializedFrame getDeclarationFrame ( VirtualFrame frame , int level ) { } @ ExplodeLoop private static MaterializedFrame getDeclarationFrame ( MaterializedFrame frame , int level ) { } }

Fix:
return ( ( RubyArguments . getUserArgumentsCount ( internalArguments ) ) - ( RubyArguments . getMethod ( internalArguments ) . getSharedMethodInfo ( ) . getArity ( ) . getKeywordsCount ( ) ) ) - 1 ;
Buggy code:
public class ViewMessageAction extends AbstractColumbaAction { protected Object oldUid ; public ViewMessageAction ( FrameMediator controller ) { } public void actionPerformed ( ActionEvent evt ) { FolderCommandReference [ ] references = ( ( FolderCommandReference [ ] ) ( getFrameMediator ( ) . getSelectionManager ( ) . getSelection ( "mail.table" ) ) ) ; Object [ ] uids = references [ 0 ] . getUids ( ) ; if ( ( uids . length ) == 1 ) { if ( ( oldUid ) == ( uids [ 0 ] ) ) { <START_BUG> log . debug ( "this<seq2seq4repair_space>message<seq2seq4repair_space>was<seq2seq4repair_space>already<seq2seq4repair_space>selected,<seq2seq4repair_space>don't<seq2seq4repair_space>fire<seq2seq4repair_space>any<seq2seq4repair_space>event" ) ; <END_BUG> return ; } oldUid = uids [ 0 ] ; processor . addOp ( new org . columba . mail . gui . message . command . ViewMessageCommand ( getFrameMediator ( ) , references ) ) ; } } }

Fix:
log . info ( "this<seq2seq4repair_space>message<seq2seq4repair_space>was<seq2seq4repair_space>already<seq2seq4repair_space>selected,<seq2seq4repair_space>don't<seq2seq4repair_space>fire<seq2seq4repair_space>any<seq2seq4repair_space>event" ) ;
Buggy code:
public class TestForceMergeForever extends LuceneTestCase { private static class MyIndexWriter extends IndexWriter { AtomicInteger mergeCount = new AtomicInteger ( ) ; private boolean first ; public MyIndexWriter ( Directory dir , IndexWriterConfig conf ) throws Exception { } @ Override public void merge ( MergePolicy . OneMerge merge ) throws IOException , CorruptIndexException { } } public void test ( ) throws Exception { final Directory d = newDirectory ( ) ; final TestForceMergeForever . MyIndexWriter w = new TestForceMergeForever . MyIndexWriter ( d , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ) ) ) ; w . getConfig ( ) . setMaxBufferedDocs ( _TestUtil . nextInt ( random , 2 , 11 ) ) ; final int numStartDocs = atLeast ( 20 ) ; <START_BUG> final LineFileDocs docs = new LineFileDocs ( random ) ; <END_BUG> for ( int docIDX = 0 ; docIDX < numStartDocs ; docIDX ++ ) { w . addDocument ( docs . nextDoc ( ) ) ; } MergePolicy mp = w . getConfig ( ) . getMergePolicy ( ) ; final int mergeAtOnce = 1 + ( w . segmentInfos . size ( ) ) ; if ( mp instanceof TieredMergePolicy ) { ( ( TieredMergePolicy ) ( mp ) ) . setMaxMergeAtOnce ( mergeAtOnce ) ; } else if ( mp instanceof LogMergePolicy ) { ( ( LogMergePolicy ) ( mp ) ) . setMergeFactor ( mergeAtOnce ) ; } else { w . close ( ) ; d . close ( ) ; return ; } final AtomicBoolean doStop = new AtomicBoolean ( ) ; w . getConfig ( ) . setMaxBufferedDocs ( 2 ) ; Thread t = new Thread ( ) { @ Override public void run ( ) { try { while ( ! ( doStop . get ( ) ) ) { w . updateDocument ( new Term ( "docid" , ( "" + ( random . nextInt ( numStartDocs ) ) ) ) , docs . nextDoc ( ) ) ; w . getReader ( ) . close ( ) ; } } catch ( Throwable t ) { throw new RuntimeException ( t ) ; } } } ; t . start ( ) ; w . forceMerge ( 1 ) ; doStop . set ( true ) ; t . join ( ) ; assertTrue ( ( "merge<seq2seq4repair_space>count<seq2seq4repair_space>is<seq2seq4repair_space>" + ( w . mergeCount . get ( ) ) ) , ( ( w . mergeCount . get ( ) ) <= 1 ) ) ; w . close ( ) ; d . close ( ) ; } }

Fix:
final LineFileDocs docs = new LineFileDocs ( random , defaultCodecSupportsDocValues ( ) ) ;
Buggy code:
public class PortletPage < T > extends Page < T > { private static final long serialVersionUID = 1L ; private static final Log log = LogFactory . getLog ( PortletPage . class ) ; private String portletMode = VIEW . toString ( ) ; private String windowState = NORMAL . toString ( ) ; protected PortletPage ( ) { } protected PortletPage ( final IModel < T > model ) { } protected PortletPage ( final PageMap pageMap ) { } protected PortletPage ( final PageMap pageMap , final IModel < T > model ) { } protected PortletPage ( final PageParameters parameters ) { } @ Override public final String getMarkupType ( ) { } protected final PortletRequestCycle getPortletRequestCycle ( ) { } public final void setPortletMode ( PortletMode portletMode ) { } public final void setWindowState ( WindowState windowState ) { } public PortletMode getPortletMode ( ) { } public WindowState getWindowState ( ) { } protected void onSetPortletMode ( PortletMode portletMode ) { } protected void onSetWindowState ( WindowState windowState ) { } private void commonInit ( ) { <START_BUG> MarkupStream markupStream = PortletPage . getAssociatedMarkupStream ( false ) ; <END_BUG> if ( markupStream == null ) { throw new MarkupNotFoundException ( ( "Each<seq2seq4repair_space>Page<seq2seq4repair_space>must<seq2seq4repair_space>have<seq2seq4repair_space>associated<seq2seq4repair_space>markup.<seq2seq4repair_space>Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>the<seq2seq4repair_space>markup<seq2seq4repair_space>file<seq2seq4repair_space>for<seq2seq4repair_space>Page:<seq2seq4repair_space>" + ( this . toString ( ) ) ) ) ; } markupStream . setCurrentIndex ( 0 ) ; while ( markupStream . hasMoreComponentTags ( ) ) { final ComponentTag tag = markupStream . getTag ( ) ; if ( ( tag . isOpen ( ) ) && ( tag . isHeadTag ( ) ) ) { if ( HEADER_ID . equals ( tag . getId ( ) ) ) { new wicket . markup . html . internal . PortletHeaderContainer ( this , tag . getId ( ) ) ; } break ; } } } }

Fix:
MarkupStream markupStream = new MarkupStream ( PortletPage . getAssociatedMarkup ( false ) ) ;
Buggy code:
public class ActionProperties extends UMLAction { public static ActionProperties SINGLETON = new ActionProperties ( ) ; protected ActionProperties ( ) { } public void actionPerformed ( ActionEvent ae ) { <START_BUG> ProjectBrowser pb = ProjectBrowser . TheInstance ; <END_BUG> if ( pb == null ) return ; pb . selectTabNamed ( "action.properties" ) ; } public boolean shouldBeEnabled ( ) { } }

Fix:
ProjectBrowser pb = ProjectBrowser . getInstance ( ) ;
Buggy code:
class StormClientPipelineFactory implements ChannelPipelineFactory { private Client client ; StormClientPipelineFactory ( Client client ) { } public ChannelPipeline getPipeline ( ) throws Exception { ChannelPipeline pipeline = Channels . pipeline ( ) ; pipeline . addLast ( "decoder" , new MessageDecoder ( ) ) ; pipeline . addLast ( "encoder" , new MessageEncoder ( ) ) ; <START_BUG> pipeline . addLast ( "handler" , new StormClientHandler ( client ) ) ; <END_BUG> return pipeline ; } }

Fix:
pipeline . addLast ( "handler" , new StormClientErrorHandler ( client . name ( ) ) ) ;
Buggy code:
public class ClientCommandFactory extends ReflexiveCommandFactory { @ Override public Command create ( IParsedCommand parsedCommand ) { <START_BUG> if ( commandProvider . isCommandAvailable ( parsedCommand . getCommandId ( ) ) ) { <END_BUG> return super . create ( parsedCommand ) ; } return new pl . edu . agh . two . mud . client . command . DelegateToServerCommand ( parsedCommand ) ; } }

Fix:
if ( getCommandProvider ( ) . isCommandAvailable ( parsedCommand . getCommandId ( ) ) ) {
Buggy code:
public class PropertiesCallbackHandler implements DomainCallbackHandler , Service < DomainCallbackHandler > { public static final String SERVICE_SUFFIX = "properties" ; private static final Class [ ] PLAIN_CALLBACKS = new Class [ ] { AuthorizeCallback . class , RealmCallback . class , NameCallback . class , PasswordCallback . class } ; private static final Class [ ] DIGEST_CALLBACKS = new Class [ ] { AuthorizeCallback . class , RealmCallback . class , NameCallback . class , DigestHashCallback . class } ; private static final String DOLLAR_LOCAL = "$local" ; private final Class [ ] supportedCallbacks ; private final String realm ; private final String path ; private final boolean plainText ; private final InjectedValue < String > relativeTo = new InjectedValue < String > ( ) ; private File propertiesFile ; private volatile long fileUpdated = - 1 ; private volatile Properties userProperties = null ; public PropertiesCallbackHandler ( String realm , ModelNode properties ) { } public void start ( StartContext context ) throws StartException { } private Properties getUsersProperties ( ) throws IOException { boolean loadRequired = ( ( userProperties ) == null ) || ( ( fileUpdated ) != ( propertiesFile . lastModified ( ) ) ) ; if ( loadRequired ) { synchronized ( this ) { long fileLastModified = propertiesFile . lastModified ( ) ; boolean loadReallyRequired = ( ( userProperties ) == null ) || ( ( fileUpdated ) != fileLastModified ) ; if ( loadReallyRequired ) { <START_BUG> DomainManagementLogger . ROOT_LOGGER . debugf ( "Reloading<seq2seq4repair_space>properties<seq2seq4repair_space>file<seq2seq4repair_space>'%s%" , propertiesFile . getAbsolutePath ( ) ) ; <END_BUG> Properties props = new Properties ( ) ; InputStream is = new FileInputStream ( propertiesFile ) ; try { props . load ( is ) ; } finally { is . close ( ) ; } checkWeakPasswords ( props ) ; userProperties = props ; fileUpdated = fileLastModified ; } } } return userProperties ; } private synchronized void persistProperties ( ) throws IOException { } private void safeClose ( final Closeable c ) { } private void checkWeakPasswords ( final Properties properties ) { } public void stop ( StopContext context ) { } public DomainCallbackHandler getValue ( ) throws IllegalArgumentException , IllegalStateException { } public InjectedValue < String > getRelativeToInjector ( ) { } public Class [ ] getSupportedCallbacks ( ) { } @ Override public boolean isReady ( ) { } public void handle ( Callback [ ] callbacks ) throws IOException , UnsupportedCallbackException { } }

Fix:
DomainManagementLogger . ROOT_LOGGER . debugf ( "Reloading<seq2seq4repair_space>properties<seq2seq4repair_space>file<seq2seq4repair_space>'%s'" , propertiesFile . getAbsolutePath ( ) ) ;
Buggy code:
public class RequestEncodingTest extends TestCase { private static final Logger log = LoggerFactory . getLogger ( RequestEncodingTest . class ) ; private WicketApplication application ; private WicketTester tester ; @ Override protected void setUp ( ) throws Exception { } @ Override protected void tearDown ( ) throws Exception { } public void testDefault ( ) { } public void testUmlautsInRequestUri ( ) { <START_BUG> application . mountBookmarkablePage ( "Aparameter" , A . class ) ; <END_BUG> testDefault ( ) ; } }

Fix:
application . mountPage ( "Aparameter" , A . class ) ;
Buggy code:
public class EmailParser { private static boolean isEmailDelim ( String line ) { } public static List < Email > parseEmails ( File file ) throws IOException { List < Email > emails = new ArrayList < Email > ( ) ; boolean first = true ; List < String > lines = new ArrayList < String > ( ) ; BufferedReader in = new BufferedReader ( new FileReader ( file ) ) ; String nextline ; while ( ( nextline = in . readLine ( ) ) != null ) { if ( EmailParser . isEmailDelim ( nextline ) ) { Email email = new Email ( lines , first ) ; if ( ( emails . size ( ) ) > 0 ) { <START_BUG> email . setChild ( emails . get ( ( ( emails . size ( ) ) - 1 ) ) ) ; <END_BUG> } emails . add ( email ) ; lines . clear ( ) ; first = false ; } else { lines . add ( nextline ) ; } } if ( ( lines . size ( ) ) > 0 ) { emails . add ( new Email ( lines , first ) ) ; } in . close ( ) ; return emails ; } }

Fix:
email . addChild ( emails . get ( ( ( emails . size ( ) ) - 1 ) ) ) ;
Buggy code:
public class Crawler extends AbstractCrawler { JSSandbox sandbox = new JSSandbox ( ) ; WebClient webClient = null ; HtmlPage currentPage = null ; private List < HtmlAnchor > hyperlinks ; private List processedPages ; private static final Logger log = Logger . getLogger ( Crawler . class . getName ( ) ) ; public static void main ( String [ ] args ) throws IOException { } @ Override public void consumeInputs ( ) { } @ Override public void processWebPage ( ) { } public String getRelativeUrl ( ) { } public String getUrl ( ) { } @ Override public List < MailSeed > extractLinks ( ) { List < MailSeed > linksExtracted = new ArrayList < MailSeed > ( ) ; for ( HtmlAnchor anchor : hyperlinks ) { String href = anchor . getHrefAttribute ( ) ; if ( href . startsWith ( "%3c" ) ) { <START_BUG> String decodedHref = Utility . decodeUrl ( href ) ; <END_BUG> linksExtracted . add ( MailSeed . newFor ( decodedHref , this . urlSuffix ) ) ; } else if ( ( href . contains ( getRelativeUrl ( ) ) ) && ( ! ( processedPages . contains ( href ) ) ) ) try { processedPages . add ( href ) ; this . hyperlinks . addAll ( ( ( HtmlPage ) ( anchor . click ( ) ) ) . getAnchors ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return linksExtracted ; } public void initializeWebClient ( ) { } public void closeWebClient ( ) { } public List < HtmlAnchor > getHyperlinks ( String url ) throws IOException { } @ Override public boolean canCrawl ( ) { } public boolean validateInput ( String relativeUrl ) { } }

Fix:
String decodedHref = Utility . decodeUrl ( Utility . encodeUrl ( href ) ) ;
Buggy code:
public class LongCompactionSpeedTest extends CleanupHelper { public static final String TABLE1 = "Keyspace1" ; public static final InetAddress LOCAL = FBUtilities . getLocalAddress ( ) ; @ Test public void testCompactionWide ( ) throws Exception { } @ Test public void testCompactionSlim ( ) throws Exception { } @ Test public void testCompactionMany ( ) throws Exception { } protected void testCompaction ( int sstableCount , int rowsPerSSTable , int colsPerRow ) throws Exception { instance . disableAutoCompaction ( ) ; Table table = Table . open ( LongCompactionSpeedTest . TABLE1 ) ; ColumnFamilyStore store = table . getColumnFamilyStore ( "Standard1" ) ; ArrayList < SSTableReader > sstables = new ArrayList < SSTableReader > ( ) ; for ( int k = 0 ; k < sstableCount ; k ++ ) { SortedMap < String , ColumnFamily > rows = new TreeMap < String , ColumnFamily > ( ) ; for ( int j = 0 ; j < rowsPerSSTable ; j ++ ) { String key = String . valueOf ( j ) ; IColumn [ ] cols = new IColumn [ colsPerRow ] ; for ( int i = 0 ; i < colsPerRow ; i ++ ) { cols [ i ] = Util . column ( String . valueOf ( i ) , String . valueOf ( i ) , k ) ; } rows . put ( key , SSTableUtils . createCF ( Long . MIN_VALUE , Integer . MIN_VALUE , cols ) ) ; } <START_BUG> SSTableReader sstable = SSTableUtils . writeSSTable ( rows ) ; <END_BUG> sstables . add ( sstable ) ; store . addSSTable ( sstable ) ; } Thread . sleep ( 1000 ) ; long start = System . currentTimeMillis ( ) ; instance . doCompaction ( store , sstables , ( ( ( int ) ( ( System . currentTimeMillis ( ) ) // 1000 ) ) - ( DatabaseDescriptor . getCFMetaData ( LongCompactionSpeedTest . TABLE1 , "Standard1" ) . getGcGraceSeconds ( ) ) ) ) ; System . out . println ( String . format ( "%s:<seq2seq4repair_space>sstables=%d<seq2seq4repair_space>rowsper=%d<seq2seq4repair_space>colsper=%d:<seq2seq4repair_space>%d<seq2seq4repair_space>ms" , this . getClass ( ) . getName ( ) , sstableCount , rowsPerSSTable , colsPerRow , ( ( System . currentTimeMillis ( ) ) - start ) ) ) ; } }

Fix:
SSTableReader sstable = SSTableUtils . prepare ( ) . write ( rows ) ;
Buggy code:
public class PointcutExpressionTest extends TestCase { PointcutParser p ; Constructor asCons ; Constructor bsCons ; Constructor bsStringCons ; Constructor clientCons ; Method a ; Method aa ; Method aaa ; Field x ; Field y ; Method b ; Method bsaa ; Field n ; Method foo ; Method bar ; public void testMatchesMethodCall ( ) { } public void testMatchesMethodExecution ( ) { } public void testMatchesConstructorCall ( ) { } public void testMatchesConstructorExecution ( ) { } public void testMatchesAdviceExecution ( ) { } public void testMatchesHandler ( ) { } public void testMatchesInitialization ( ) { } public void testMatchesPreInitialization ( ) { } public void testMatchesStaticInitialization ( ) { } public void testMatchesFieldSet ( ) { } public void testMatchesFieldGet ( ) { } public void testArgsMatching ( ) { } public void testGetPointcutExpression ( ) { } public void testCouldMatchJoinPointsInType ( ) { } public void testMayNeedDynamicTest ( ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; <START_BUG> p = new PointcutParser ( ) ; <END_BUG> asCons = PointcutExpressionTest . A . class . getConstructor ( new Class [ ] { String . class } ) ; bsCons = PointcutExpressionTest . B . class . getConstructor ( new Class [ 0 ] ) ; bsStringCons = PointcutExpressionTest . B . class . getConstructor ( new Class [ ] { String . class } ) ; a = PointcutExpressionTest . A . class . getMethod ( "a" , new Class [ 0 ] ) ; aa = PointcutExpressionTest . A . class . getMethod ( "aa" , new Class [ ] { int . class } ) ; aaa = PointcutExpressionTest . A . class . getMethod ( "aaa" , new Class [ ] { String . class , int . class } ) ; x = PointcutExpressionTest . A . class . getDeclaredField ( "x" ) ; y = PointcutExpressionTest . B . class . getDeclaredField ( "y" ) ; b = PointcutExpressionTest . B . class . getMethod ( "b" , new Class [ 0 ] ) ; bsaa = PointcutExpressionTest . B . class . getMethod ( "aa" , new Class [ ] { int . class } ) ; clientCons = PointcutExpressionTest . Client . class . getConstructor ( new Class [ 0 ] ) ; n = PointcutExpressionTest . Client . class . getDeclaredField ( "n" ) ; foo = PointcutExpressionTest . Client . class . getDeclaredMethod ( "foo" , new Class [ ] { String . class , int . class , Number . class } ) ; bar = PointcutExpressionTest . Client . class . getDeclaredMethod ( "bar" , new Class [ ] { String . class , int . class , Integer . class , Number . class } ) ; } static class A { public A ( String s ) { } public void a ( ) { } public void aa ( int i ) { } public void aaa ( String s , int i ) { } int x ; } static class B extends PointcutExpressionTest . A { public B ( ) { } public B ( String s ) { } public String b ( ) { } public void aa ( int i ) { } int y ; } static class Client { public Client ( ) { } Number n ; public void foo ( String s , int i , Number n ) { } public void bar ( String s , int i , Integer i2 , Number n ) { } } static class X { } }

Fix:
p = PointcutParser . getPointcutParserSupportingAllPrimitivesAndUsingSpecifiedClassloaderForResolution ( this . getClass ( ) . getClassLoader ( ) ) ;
Buggy code:
public final class EndOfInputMatcherTest { private final MatchHandler handler = SimpleMatchHandler . INSTANCE ; private MatcherContextBuilder builder ; @ BeforeMethod public void initContext ( ) { <START_BUG> builder = new MatcherContextBuilder ( ) . withInput ( "hello" ) . withMatcher ( INSTANCE ) ; <END_BUG> } @ DataProvider public Iterator < Object [ ] > indicesAndBooleans ( ) { } @ Test ( dataProvider = "indicesAndBooleans" ) public void matcherWorksCorrectly ( final int index , final boolean expected ) { } }

Fix:
builder = new MatcherContextBuilder ( ) . withInput ( "hello" ) . withMatcher ( new EndOfInputMatcher ( ) ) ;
Buggy code:
public class SharedResources { private static Log log = LogFactory . getLog ( SharedResources . class ) ; private class ResourceState { private Resource resource ; private TimerTask idleTask ; private TimerTask cacheTask ; ResourceState ( String key , Resource resource ) { } private void makeCacheTask ( String key ) { } private void makeIdleTask ( String key ) { } void cancel ( ) { } void touch ( String key ) { } } private final Map resourceMap = new HashMap ( ) ; private final Timer idleTimer = new Timer ( true ) ; private final Application application ; SharedResources ( Application application ) { } public static String path ( final String path , final Locale locale , final String style ) { } public static String path ( final Application application , final Class scope , final String path , final Locale locale , final String style ) { <START_BUG> return ( ( application . getPages ( ) . aliasForClass ( scope ) ) + '//' ) + ( SharedResources . path ( path , locale , style ) ) ; <END_BUG> } public final void add ( final Class scope , final String name , final Locale locale , final String style , final Resource resource ) { } public final void add ( final String name , final Locale locale , final Resource resource ) { } public final void add ( final String name , final Resource resource ) { } public final Resource get ( final Class scope , final String name , final Locale locale , final String style , boolean exact ) { } public final Resource get ( final String key ) { } public final void remove ( final String key ) { } public final void onResourceRequested ( final String key ) { } private TimerTask getResourceTimeoutTask ( final String key ) { } private TimerTask getDynamicImageFlushTask ( final String key , final DynamicByteArrayResource resource ) { } }

Fix:
return ( ( scope . getName ( ) ) + '//' ) + ( SharedResources . path ( path , locale , style ) ) ;
Buggy code:
public class PropertyHelperTask extends Task { public class DelegateElement { private String refid ; private DelegateElement ( ) { } public String getRefid ( ) { } public void setRefid ( String refid ) { } private Delegate resolve ( ) { } } private PropertyHelper propertyHelper ; private List delegates ; public PropertyHelperTask ( Project project ) { } public synchronized void addConfigured ( PropertyHelper propertyHelper ) { } public synchronized void addConfigured ( PropertyHelper . Delegate delegate ) { } public PropertyHelperTask . DelegateElement createDelegate ( ) { } public void execute ( ) throws BuildException { if ( ( ( propertyHelper ) == null ) && ( ( delegates ) == null ) ) { throw new BuildException ( ( "Either<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>PropertyHelper" + "<seq2seq4repair_space>or<seq2seq4repair_space>one<seq2seq4repair_space>or<seq2seq4repair_space>more<seq2seq4repair_space>PropertyHelper<seq2seq4repair_space>delegates<seq2seq4repair_space>are<seq2seq4repair_space>required" ) ) ; } PropertyHelper ph = propertyHelper ; if ( ph == null ) { <START_BUG> ph = ( ( PropertyHelper ) ( getProject ( ) . getReference ( REFID_PROPERTY_HELPER ) ) ) ; <END_BUG> } else { ph = propertyHelper ; } synchronized ( ph ) { if ( ( delegates ) != null ) { for ( Iterator iter = delegates . iterator ( ) ; iter . hasNext ( ) ; ) { Object o = iter . next ( ) ; PropertyHelper . Delegate delegate = ( o instanceof PropertyHelperTask . DelegateElement ) ? ( ( PropertyHelperTask . DelegateElement ) ( o ) ) . resolve ( ) : ( ( PropertyHelper . Delegate ) ( o ) ) ; log ( ( "Adding<seq2seq4repair_space>PropertyHelper<seq2seq4repair_space>delegate<seq2seq4repair_space>" + delegate ) , MSG_DEBUG ) ; ph . add ( delegate ) ; } } } if ( ( propertyHelper ) != null ) { log ( ( "Installing<seq2seq4repair_space>PropertyHelper<seq2seq4repair_space>" + ( propertyHelper ) ) , MSG_DEBUG ) ; getProject ( ) . addReference ( REFID_PROPERTY_HELPER , propertyHelper ) ; } } private synchronized List getAddDelegateList ( ) { } }

Fix:
ph = PropertyHelper . getPropertyHelper ( getProject ( ) ) ;
Buggy code:
public class JavadocSingleNameReference extends SingleNameReference { public int tagSourceStart ; public int tagSourceEnd ; public JavadocSingleNameReference ( char [ ] source , long pos , int tagStart , int tagEnd ) { } public void resolve ( BlockScope scope ) { } public void resolve ( BlockScope scope , boolean warn ) { LocalVariableBinding variableBinding = scope . findVariable ( this . token ) ; <START_BUG> if ( ( ( variableBinding != null ) && ( variableBinding . isValidBinding ( ) ) ) && ( variableBinding . isArgument ) ) { <END_BUG> this . binding = variableBinding ; return ; } if ( warn ) { try { MethodScope methScope = ( ( MethodScope ) ( scope ) ) ; scope . problemReporter ( ) . javadocUndeclaredParamTagName ( this . token , this . sourceStart , this . sourceEnd , methScope . referenceMethod ( ) . modifiers ) ; } catch ( Exception e ) { scope . problemReporter ( ) . javadocUndeclaredParamTagName ( this . token , this . sourceStart , this . sourceEnd , ( - 1 ) ) ; } } } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( ( variableBinding != null ) && ( variableBinding . isValidBinding ( ) ) ) && ( ( ( variableBinding . tagBits ) & ( TagBits . IsArgument ) ) != 0 ) ) {