nus-yam/ex-repair huggingface dataset:
Buggy code:
final class MSNRosterEntry implements IUser , IPresence , IRosterEntry { private static final long serialVersionUID = 5358415024505371809L ; private Collection groups ; private IRosterItem parent ; private final Contact contact ; private MSNID id ; private IRoster roster ; private Map properties ; MSNRosterEntry ( IRoster roster , Contact contact , Namespace namespace ) { } void updatePersonalMessage ( ) { } Contact getContact ( ) { } public String getName ( ) { } public Mode getMode ( ) { } public Map getProperties ( ) { } public String getStatus ( ) { } public Type getType ( ) { } public Object getAdapter ( Class adapter ) { } public Collection getGroups ( ) { } public IPresence getPresence ( ) { } public IUser getUser ( ) { } void setParent ( IRosterItem parent ) { } public IRosterItem getParent ( ) { } public byte [ ] getPictureData ( ) { <START_BUG> return null ; <END_BUG> } public ID getID ( ) { } public String getNickname ( ) { } public IRoster getRoster ( ) { } }

Fix:
return new byte [ 0 ] ;
Buggy code:
public class PoolObjectList < O extends PoolObject < O , T > , T extends MappedElement > implements List < O > , PoolObjectCollection < O , T > { private final TIntList indices ; private final Pool < O , T > pool ; public PoolObjectList ( final Pool < O , T > pool ) { } public PoolObjectList ( final Pool < O , T > pool , final int initialCapacity ) { } protected PoolObjectList ( final PoolObjectList < O , T > list , final TIntList indexSubList ) { } @ Override public TIntList getIndexCollection ( ) { } @ Override public boolean add ( final O obj ) { } @ Override public void add ( final int index , final O obj ) { } @ Override public boolean addAll ( final Collection < ? extends O > objs ) { } @ Override public boolean addAll ( final int index , final Collection < ? extends O > objs ) { } @ Override public void clear ( ) { } @ Override public boolean contains ( final Object obj ) { } @ Override public boolean containsAll ( final Collection < ? > objs ) { } public O get ( final int index , final O obj ) { <START_BUG> obj . updateAccess ( pool . getMemPool ( ) , index ) ; <END_BUG> return obj ; } @ Override public O get ( final int index ) { } @ Override public int indexOf ( final Object obj ) { } @ Override public boolean isEmpty ( ) { } @ Override public Iterator < O > iterator ( ) { } @ Override public int lastIndexOf ( final Object obj ) { } private final int modCount = 0 ; private class ListItr implements ListIterator < O > { final O obj = pool . createRef ( ) ; int cursor ; int lastRet = - 1 ; int expectedModCount = modCount ; ListItr ( final int index ) { } @ Override public boolean hasNext ( ) { } @ Override public O next ( ) { } @ Override public void remove ( ) { } @ Override public boolean hasPrevious ( ) { } @ Override public O previous ( ) { } @ Override public int nextIndex ( ) { } @ Override public int previousIndex ( ) { } @ Override public void set ( final O o ) { } @ Override public void add ( final O o ) { } final void checkForComodification ( ) { } } @ Override public ListIterator < O > listIterator ( ) { } @ Override public ListIterator < O > listIterator ( final int index ) { } @ Override public boolean remove ( final Object obj ) { } public O remove ( final int index , final O obj ) { } @ Override public O remove ( final int index ) { } @ Override public boolean removeAll ( final Collection < ? > objs ) { } @ Override public boolean retainAll ( final Collection < ? > objs ) { } public O set ( final int index , final O obj , final O replacedObj ) { } @ Override public O set ( final int index , final O obj ) { } @ Override public int size ( ) { } @ Override public List < O > subList ( final int fromIndex , final int toIndex ) { } @ Override public Object [ ] toArray ( ) { } @ Override public < T > T [ ] toArray ( final T [ ] a ) { } }

Fix:
obj . updateAccess ( pool . getMemPool ( ) , indices . get ( index ) ) ;
Buggy code:
public class UploadApplication extends WicketExampleApplication { public UploadApplication ( ) { } @ Override protected void init ( ) { } @ Override public Class < ? extends Page > getHomePage ( ) { } @ Override <START_BUG> protected WebRequest newWebRequest ( HttpServletRequest servletRequest ) { <END_BUG> return new wicket . extensions . ajax . markup . html . form . upload . UploadWebRequest ( servletRequest ) ; } }

Fix:
protected WebRequest newWebRequest ( final HttpServletRequest servletRequest ) {
Buggy code:
public class MetFragSHGeneration { public static void main ( String [ ] args ) throws IOException { String writePath = "//home//swolf//MOPAC//Hill-Riken-MM48_POSITIVE_PubChem_LocalMass2009_CHONPS_NEW//MFNLFixWNLsh//" ; String pathToSpectra = "//home//swolf//MOPAC//Hill-Riken-MM48_POSITIVE_PubChem_LocalMass2009_CHONPS_NEW//spectra//" ; <START_BUG> String pathToJar = "//home//swolf//MOPAC//Hill-Riken-MM48_POSITIVE_PubChem_LocalMass2009_CHONPS_NEW//jar//MetFragPreCalculated_NLFix_withNLBugfix.jar" ; <END_BUG> String pathToPreCalculatedCML = "//home//swolf//MOPAC//Hill-Riken-MM48_POSITIVE_PubChem_LocalMass2009_CHONPS_NEW//mopac_4800//" ; String configPath = "//home//swolf//MOPAC//Hill-Riken-MM48_POSITIVE_PubChem_LocalMass2009_CHONPS_NEW//config//" ; DateFormat dateFormat = new SimpleDateFormat ( "yyyy-MM-dd_HH-mm-ss" ) ; Date date = new Date ( ) ; String dateString = dateFormat . format ( date ) ; if ( ! ( writePath . contains ( "sh//" ) ) ) { System . err . println ( "Please<seq2seq4repair_space>use<seq2seq4repair_space>a<seq2seq4repair_space>folder<seq2seq4repair_space>structure<seq2seq4repair_space>that<seq2seq4repair_space>uses<seq2seq4repair_space>//...//...//sh//<seq2seq4repair_space>at<seq2seq4repair_space>the<seq2seq4repair_space>end" ) ; System . exit ( 1 ) ; } FileUtils . deleteDirectory ( new File ( writePath ) ) ; new File ( writePath ) . mkdirs ( ) ; File [ ] spectraFolder = new File ( pathToSpectra ) . listFiles ( ) ; Arrays . sort ( spectraFolder ) ; for ( File file : spectraFolder ) { if ( ! ( file . isFile ( ) ) ) continue ; String fileName = file . getName ( ) ; int dotPos = fileName . indexOf ( "." ) ; String extension = "" ; if ( dotPos >= 0 ) extension = fileName . substring ( dotPos ) ; WrapperSpectrum spectrum = new WrapperSpectrum ( file . toString ( ) ) ; File f2 = new File ( ( ( ( writePath + "sge_" ) + ( file . getName ( ) . split ( "\\." ) [ 0 ] ) ) + ".sh" ) ) ; BufferedWriter out = new BufferedWriter ( new FileWriter ( f2 ) ) ; out . write ( "#!//bin//bash" ) ; out . newLine ( ) ; out . write ( ( ( ( ( ( ( ( ( ( ( "java<seq2seq4repair_space>-Dproperty.file.path=" + configPath ) + "<seq2seq4repair_space>-Xms1500m<seq2seq4repair_space>-Xmx5500m<seq2seq4repair_space>-jar<seq2seq4repair_space>" ) + pathToJar ) + "<seq2seq4repair_space>\"" ) + ( file . getPath ( ) ) ) + "\"<seq2seq4repair_space>\"" ) + dateString ) + "\"<seq2seq4repair_space>\"" ) + ( new File ( pathToPreCalculatedCML ) ) ) + "//\"" ) ) ; out . close ( ) ; } } }

Fix:
String pathToJar = "//home//swolf//MOPAC//Hill-Riken-MM48_POSITIVE_PubChem_LocalMass2009_CHONPS_NEW//jar//MetFragPreCalculated_Rrp_CVAverage.jar" ;
Buggy code:
public abstract class WicketTestCase extends TestCase { public WicketTester application ; public WicketTestCase ( String name ) { } protected void setUp ( ) throws Exception { } protected void executeTest ( final Class pageClass , final String filename ) throws Exception { } protected void executedListener ( final Class pageClass , final Component component , final String filename ) throws Exception { } protected void executedBehavior ( final Class pageClass , final AbstractAjaxBehavior behavior , final String filename ) throws Exception { assertNotNull ( behavior ) ; System . out . println ( ( ( ( ( "===<seq2seq4repair_space>" + ( pageClass . getName ( ) ) ) + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( behavior . toString ( ) ) ) + "<seq2seq4repair_space>===" ) ) ; application . setupRequestAndResponse ( ) ; WebRequestCycle cycle = application . createRequestCycle ( ) ; <START_BUG> application . getServletRequest ( ) . setRequestToRedirectString ( behavior . getCallbackUrl ( false , false ) . toString ( ) ) ; <END_BUG> application . processRequestCycle ( cycle ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( DiffUtil . validatePage ( document , pageClass , filename ) ) ; } }

Fix:
application . getServletRequest ( ) . setRequestToRedirectString ( behavior . getCallbackUrl ( false ) . toString ( ) ) ;
Buggy code:
public class TestThreadSafe extends LuceneTestCase { Random r ; Directory dir1 ; Directory dir2 ; IndexReader ir1 ; IndexReader ir2 ; String failure = null ; class Thr extends Thread { final int iter ; final Random rand ; public Thr ( int iter , Random rand ) { } public void run ( ) { } void loadDoc ( IndexReader ir ) throws IOException { } } void validateField ( Fieldable f ) { } String [ ] words = "now<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>time<seq2seq4repair_space>for<seq2seq4repair_space>all<seq2seq4repair_space>good<seq2seq4repair_space>men<seq2seq4repair_space>to<seq2seq4repair_space>come<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>aid<seq2seq4repair_space>of<seq2seq4repair_space>their<seq2seq4repair_space>country" . split ( "<seq2seq4repair_space>" ) ; void buildDir ( Directory dir , int nDocs , int maxFields , int maxFieldLen ) throws IOException { } void doTest ( int iter , int nThreads ) throws Exception { } public void testLazyLoadThreadSafety ( ) throws Exception { r = newRandom ( ) ; dir1 = new RAMDirectory ( ) ; buildDir ( dir1 , 15 , 5 , 2000 ) ; for ( int i = 0 ; i < 100 ; i ++ ) { <START_BUG> ir1 = IndexReader . open ( dir1 ) ; <END_BUG> doTest ( 10 , 100 ) ; } } }

Fix:
ir1 = IndexReader . open ( dir1 , false ) ;
Buggy code:
public class DefaultResourceAdapterWriteHandler extends AbstractWriteAttributeHandler < Void > { public static final DefaultResourceAdapterWriteHandler INSTANCE = new DefaultResourceAdapterWriteHandler ( ) ; private DefaultResourceAdapterWriteHandler ( ) { } @ Override protected boolean applyUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode resolvedValue , ModelNode currentValue , HandbackHolder < Void > handbackHolder ) throws OperationFailedException { } @ Override protected void revertUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode valueToRestore , ModelNode valueToRevert , Void handback ) throws OperationFailedException { } void updateDefaultAdapterService ( final OperationContext context , final ModelNode model , List < ServiceController < ? > > newControllers ) throws OperationFailedException { <START_BUG> final ModelNode adapterNameNode = DEFAULT_RESOURCE_ADAPTER_NAME . validateResolvedOperation ( model ) ; <END_BUG> final String adapterName = ( adapterNameNode . isDefined ( ) ) ? adapterNameNode . asString ( ) : null ; final ServiceRegistry serviceRegistry = context . getServiceRegistry ( true ) ; ServiceController < DefaultResourceAdapterService > existingDefaultRANameService = ( ( ServiceController < DefaultResourceAdapterService > ) ( serviceRegistry . getService ( DEFAULT_RA_NAME_SERVICE_NAME ) ) ) ; if ( existingDefaultRANameService != null ) { existingDefaultRANameService . getValue ( ) . setResourceAdapterName ( adapterName ) ; } else if ( adapterName != null ) { final DefaultResourceAdapterService defaultResourceAdapterService = new DefaultResourceAdapterService ( adapterName ) ; ServiceController < ? > newController = context . getServiceTarget ( ) . addService ( DEFAULT_RA_NAME_SERVICE_NAME , defaultResourceAdapterService ) . install ( ) ; if ( newControllers != null ) { newControllers . add ( newController ) ; } } } }

Fix:
final ModelNode adapterNameNode = DEFAULT_RESOURCE_ADAPTER_NAME . resolveModelAttribute ( context , model ) ;
Buggy code:
public class ApplicationWindow extends Window implements IRunnableContext { private MenuManager menuBarManager = null ; private ToolBarManager toolBarManager = null ; private StatusLineManager statusLineManager = null ; class ApplicationWindowLayout extends Layout { static final int VGAP = 2 ; protected Point computeSize ( Composite composite , int wHint , int hHint , boolean flushCache ) { } protected void layout ( Composite composite , boolean flushCache ) { } } public ApplicationWindow ( Shell parentShell ) { } protected void addMenuBar ( ) { } protected void addStatusLine ( ) { } protected void addToolBar ( int style ) { } public boolean close ( ) { } protected void configureShell ( Shell shell ) { super . configureShell ( shell ) ; if ( ( menuBarManager ) != null ) { menuBarManager . updateAll ( true ) ; shell . setMenuBar ( menuBarManager . createMenuBar ( shell ) ) ; } shell . setLayout ( new ApplicationWindow . ApplicationWindowLayout ( ) ) ; new Label ( shell , ( ( SWT . SEPARATOR ) | ( SWT . HORIZONTAL ) ) ) ; createToolBarControl ( shell ) ; if ( ( statusLineManager ) != null ) { <START_BUG> Control control = statusLineManager . createControl ( shell ) ; <END_BUG> } } protected MenuManager createMenuManager ( ) { } protected StatusLineManager createStatusLineManager ( ) { } protected ToolBarManager createToolBarManager ( int style ) { } protected Control createToolBarControl ( Shell shell ) { } protected Font getFont ( ) { } public MenuManager getMenuBarManager ( ) { } protected StatusLineManager getStatusLineManager ( ) { } public String getSymbolicFontName ( ) { } public ToolBarManager getToolBarManager ( ) { } protected Control getToolBarControl ( ) { } public void run ( final boolean fork , boolean cancelable , final IRunnableWithProgress runnable ) throws InterruptedException , InvocationTargetException { } public void setStatus ( String message ) { } protected boolean toolBarChildrenExist ( ) { } }

Fix:
statusLineManager . createControl ( shell ) ;
Buggy code:
public class NTFSVolume { private static final Logger log = Logger . getLogger ( NTFSVolume . class ) ; public static final byte LONG_FILE_NAMES = 1 ; public static final byte DOS_8_3 = 2 ; private byte currentNameSpace = NTFSVolume . LONG_FILE_NAMES ; private final BlockDeviceAPI api ; private final int clusterSize ; private final BootRecord bootRecord ; private MasterFileTable mftFileRecord ; private FileRecord rootDirectory ; public NTFSVolume ( BlockDeviceAPI api ) throws IOException { } public final BootRecord getBootRecord ( ) { } public void readCluster ( long cluster , byte [ ] dst , int dstOffset ) throws IOException { } private int readClusterCount ; private int readClustersCount ; public void readClusters ( long firstCluster , byte [ ] dst , int dstOffset , int nrClusters ) throws IOException { } public int getClusterSize ( ) { } public MasterFileTable getMFT ( ) throws IOException { if ( ( mftFileRecord ) == null ) { final BootRecord bootRecord = getBootRecord ( ) ; final int bytesPerFileRecord = bootRecord . getFileRecordSize ( ) ; final int clusterSize = getClusterSize ( ) ; final int nrClusters ; if ( bytesPerFileRecord < clusterSize ) { nrClusters = 1 ; } else { <START_BUG> nrClusters = bytesPerFileRecord // clusterSize ; <END_BUG> } final byte [ ] data = new byte [ nrClusters * clusterSize ] ; readClusters ( bootRecord . getMftLcn ( ) , data , 0 , nrClusters ) ; mftFileRecord = new MasterFileTable ( this , data , 0 ) ; mftFileRecord . checkIfValid ( ) ; } return mftFileRecord ; } public FileRecord getRootDirectory ( ) throws IOException { } public byte getCurrentNameSpace ( ) { } }

Fix:
nrClusters = ( ( bytesPerFileRecord + clusterSize ) - 1 ) // clusterSize ;
Buggy code:
public class WhileStatement extends Statement { private Expression expression = null ; private Statement body = null ; WhileStatement ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { WhileStatement result = new WhileStatement ( target ) ; result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <START_BUG> result . setLeadingComment ( getLeadingComment ( ) ) ; <END_BUG> result . setExpression ( ( ( Expression ) ( getExpression ( ) . clone ( target ) ) ) ) ; result . setBody ( ( ( Statement ) ( getBody ( ) . clone ( target ) ) ) ) ; return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public Statement getBody ( ) { } public void setBody ( Statement statement ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . copyLeadingComment ( this ) ;
Buggy code:
public class EvaluationContextWrapper implements IEvaluationContext { protected EvaluationContext context ; protected JavaProject project ; public EvaluationContextWrapper ( EvaluationContext context , JavaProject project ) { } public IGlobalVariable [ ] allVariables ( ) { } protected void checkBuilderState ( ) throws JavaModelException { } public void codeComplete ( String codeSnippet , int position , ICodeCompletionRequestor requestor ) throws JavaModelException { <START_BUG> this . context . complete ( codeSnippet . toCharArray ( ) , position , this . project . getSearchableNameEnvironment ( ) , new CompletionRequestorWrapper ( requestor ) , JavaCore . getOptions ( ) ) ; <END_BUG> } public IJavaElement [ ] codeSelect ( String codeSnippet , int offset , int length ) throws JavaModelException { } public void deleteVariable ( IGlobalVariable variable ) { } public void evaluateCodeSnippet ( String codeSnippet , String [ ] localVariableTypeNames , String [ ] localVariableNames , int [ ] localVariableModifiers , IType declaringType , boolean isStatic , boolean isConstructorCall , ICodeSnippetRequestor requestor , IProgressMonitor progressMonitor ) throws JavaModelException { } public void evaluateCodeSnippet ( String codeSnippet , ICodeSnippetRequestor requestor , IProgressMonitor progressMonitor ) throws JavaModelException { } public void evaluateVariable ( IGlobalVariable variable , ICodeSnippetRequestor requestor , IProgressMonitor progressMonitor ) throws JavaModelException { } protected INameEnvironment getBuildNameEnvironment ( ) throws JavaModelException { } public String [ ] getImports ( ) { } public EvaluationContext getInfrastructureEvaluationContext ( ) { } protected IRequestor getInfrastructureEvaluationRequestor ( ICodeSnippetRequestor requestor ) { } public String getPackageName ( ) { } protected IProblemFactory getProblemFactory ( ) throws JavaModelException { } public IJavaProject getProject ( ) { } protected void handleInstallException ( InstallException e ) throws JavaModelException { } public IGlobalVariable newVariable ( String typeName , String name , String initializer ) { } public void setImports ( String [ ] imports ) { } public void setPackageName ( String packageName ) { } public void validateImports ( ICodeSnippetRequestor requestor ) throws JavaModelException { } }

Fix:
this . context . complete ( codeSnippet . toCharArray ( ) , position , this . project . getSearchableNameEnvironment ( ) , new CompletionRequestorWrapper ( requestor , this . project . getNameLookup ( ) ) , JavaCore . getOptions ( ) ) ;
Buggy code:
public class MetricsInterceptor extends AbstractInterceptor implements MetricsConstants { private Container container = null ; private Context namingContext = null ; private TopicPublisher metricsPub = null ; private TopicSession metricsSession = null ; private Topic metricsTopic = null ; private String applicationName = "<undefined>" ; private String beanName = "<undefined>" ; public void setContainer ( Container container ) { } public Container getContainer ( ) { } public Object invokeHome ( MethodInvocation mi ) throws Exception { } public Object invoke ( MethodInvocation mi ) throws Exception { } public void init ( ) { } private void sendMessage ( long time , Message msg ) { try { msg . setLongProperty ( TIME , time ) ; <START_BUG> metricsPub . publish ( msg , NON_PERSISTENT , 1 , 1 ) ; <END_BUG> } catch ( Exception e ) { } } private Message createMessage ( MethodInvocation mi , String checkpoint ) { } }

Fix:
metricsPub . publish ( msg , NON_PERSISTENT , 1 , 10000 ) ;
Buggy code:
public class WebBinder extends GenericBinder { private String defaultPrefix = "!" ; private String presentPrefix = "_" ; public WebBinder ( Object model ) { } public void setDefaultPrefix ( String defaultPrefix ) { } public void setPresentPrefix ( String presentPrefix ) { } @ Override protected Map < String , ? extends Object > filter ( Map < String , ? extends Object > sourceValues ) { } protected Object getEmptyValue ( PropertyBinding binding ) { <START_BUG> Class < ? > type = binding . getModel ( ) . getValueType ( ) ; <END_BUG> if ( ( boolean . class . equals ( type ) ) || ( Boolean . class . equals ( type ) ) ) { return Boolean . FALSE ; } else { return null ; } } }

Fix:
Class < ? > type = binding . getValueModel ( ) . getValueType ( ) ;
Buggy code:
public abstract class UpdateAncestorDAO extends BaseDAO < Boolean > { public UpdateAncestorDAO ( HttpServlet servlet ) { } protected int fatherId ( Connection connection , int unitId ) throws SQLException { } protected int level ( Connection connection , int unitId ) throws SQLException { } private int intQueryFormTabUnitById ( Connection connection , String field , int unitId ) throws SQLException { <START_BUG> String sql = ( "SELECT<seq2seq4repair_space>" + field ) + "<seq2seq4repair_space>FROM<seq2seq4repair_space>tab_unit<seq2seq4repair_space>WHERE<seq2seq4repair_space>valid<seq2seq4repair_space>=<seq2seq4repair_space>1<seq2seq4repair_space>and<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>?" ; <END_BUG> PreparedStatement ps = connection . prepareStatement ( sql ) ; ps . setInt ( 1 , unitId ) ; ResultSet rs = ps . executeQuery ( ) ; return rs . next ( ) ? rs . getInt ( 1 ) : 0 ; } No newline ; at end ; of file ; }

Fix:
String sql = ( "SELECT<seq2seq4repair_space>" + field ) + "<seq2seq4repair_space>FROM<seq2seq4repair_space>tab_unit<seq2seq4repair_space>WHERE<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>?" ;
Buggy code:
public final class ImageMap extends WebMarkupContainer { private static final long serialVersionUID = 1L ; private final List shapeLinks = new ArrayList ( ) ; private static final class CircleLink extends ImageMap . ShapeLink { private static final long serialVersionUID = 1L ; private final int radius ; private final int x ; private final int y ; public CircleLink ( final int x , final int y , final int radius , final Link link ) { } String getCoordinates ( ) { } String getType ( ) { } } private static final class PolygonLink extends ImageMap . ShapeLink { private static final long serialVersionUID = 1L ; private final int [ ] coordinates ; public PolygonLink ( final int [ ] coordinates , final Link link ) { } String getCoordinates ( ) { } String getType ( ) { } } private static final class RectangleLink extends ImageMap . ShapeLink { private static final long serialVersionUID = 1L ; private final int x1 ; private final int x2 ; private final int y1 ; private final int y2 ; public RectangleLink ( final int x1 , final int y1 , final int x2 , final int y2 , final Link link ) { } String getCoordinates ( ) { } String getType ( ) { } } private abstract static class ShapeLink implements Serializable { private final Link link ; public ShapeLink ( final Link link ) { } public String toString ( ) { } abstract String getCoordinates ( ) { } abstract String getType ( ) { } } public ImageMap ( final String id ) { } public ImageMap addCircleLink ( final int x1 , final int y1 , final int radius , final Link link ) { } public ImageMap addPolygonLink ( final int [ ] coordinates , final Link link ) { } public ImageMap addRectangleLink ( final int x1 , final int y1 , final int x2 , final int y2 , final Link link ) { } protected void onRender ( final MarkupStream markupStream ) { final ComponentTag tag = markupStream . getTag ( ) . mutable ( ) ; checkComponentTag ( tag , "img" ) ; tag . put ( "usemap" , ( "#" + ( getPath ( ) ) ) ) ; renderComponentTag ( tag ) ; markupStream . next ( ) ; final StringBuffer imageMap = new StringBuffer ( ) ; <START_BUG> imageMap . append ( ( ( "\n<map<seq2seq4repair_space>name=\"" + ( getPath ( ) ) ) + "\"><seq2seq4repair_space>" ) ) ; <END_BUG> for ( Iterator iterator = shapeLinks . iterator ( ) ; iterator . hasNext ( ) ; ) { final ImageMap . ShapeLink shapeLink = ( ( ImageMap . ShapeLink ) ( iterator . next ( ) ) ) ; imageMap . append ( '\n' ) ; imageMap . append ( shapeLink . toString ( ) ) ; shapeLink . link . rendered ( ) ; } imageMap . append ( "\n<//map>" ) ; getResponse ( ) . write ( imageMap . toString ( ) ) ; } }

Fix:
imageMap . append ( "\n<map<seq2seq4repair_space>name=\"" ) . append ( getPath ( ) ) . append ( "\"><seq2seq4repair_space>" ) ;
Buggy code:
public class TestLimitTokenCountAnalyzer extends BaseTokenStreamTestCase { public void testLimitTokenCountAnalyzer ( ) throws IOException { } public void testLimitTokenCountIndexWriter ( ) throws IOException { for ( boolean consumeAll : new boolean [ ] { true , false } ) { Directory dir = newDirectory ( ) ; int limit = TestUtil . nextInt ( random ( ) , 50 , 101000 ) ; MockAnalyzer mock = new MockAnalyzer ( random ( ) ) ; mock . setEnableChecks ( consumeAll ) ; Analyzer a = new LimitTokenCountAnalyzer ( mock , limit , consumeAll ) ; IndexWriter writer = new IndexWriter ( dir , new org . apache . lucene . index . IndexWriterConfig ( TEST_VERSION_CURRENT , a ) ) ; Document doc = new Document ( ) ; StringBuilder b = new StringBuilder ( ) ; for ( int i = 1 ; i < limit ; i ++ ) b . append ( "<seq2seq4repair_space>a" ) ; b . append ( "<seq2seq4repair_space>x" ) ; b . append ( "<seq2seq4repair_space>z" ) ; doc . add ( newTextField ( "field" , b . toString ( ) , NO ) ) ; writer . addDocument ( doc ) ; <START_BUG> writer . close ( ) ; <END_BUG> IndexReader reader = DirectoryReader . open ( dir ) ; Term t = new Term ( "field" , "x" ) ; assertEquals ( 1 , reader . docFreq ( t ) ) ; t = new Term ( "field" , "z" ) ; assertEquals ( 0 , reader . docFreq ( t ) ) ; reader . close ( ) ; dir . close ( ) ; } } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public final class UiUrlBuilder { private UiUrlBuilder ( ) { } public static String relativeUrlForActivity ( final long activityId ) { } public static String relativeUrlForEntity ( final Identifiable entity ) { } public static String relativeUrlForEntity ( final EntityType type , final String uniqueId ) { } public static String relativeUrlForFlaggedActivity ( ) { } public static String relativeUrlForPendingGroupRequest ( ) { } public static String relativeUrlForGroupAccessRequest ( final String uniqueId ) { <START_BUG> return "#activity//group//" + uniqueId ; <END_BUG> } }

Fix:
return ( "#activity//group//" + uniqueId ) + "?detailtab=admin" ;
Buggy code:
public class ToolBar extends Composite { ToolItem lastFocus ; public ToolBar ( Composite parent , int style ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } void createHandle ( int index ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } int eventHandle ( ) { } boolean forceFocus ( int focusHandle ) { } public ToolItem getItem ( int index ) { } public ToolItem getItem ( Point point ) { } public int getItemCount ( ) { } public ToolItem [ ] getItems ( ) { } public int getRowCount ( ) { } int gtk_key_press_event ( int widget , int eventPtr ) { if ( ! ( hasFocus ( ) ) ) return 0 ; int result = super . gtk_key_press_event ( widget , eventPtr ) ; if ( result != 0 ) return result ; ToolItem [ ] items = getItems ( ) ; int length = items . length ; int index = 0 ; while ( index < length ) { if ( items [ index ] . hasFocus ( ) ) break ; index ++ ; } GdkEventKey gdkEvent = new GdkEventKey ( ) ; OS . memmove ( gdkEvent , eventPtr , sizeof ) ; boolean next = false ; switch ( gdkEvent . keyval ) { case OS . GDK_Up : case OS . GDK_Left : next = false ; break ; case OS . GDK_Down : { if ( ( 0 <= index ) && ( index < length ) ) { ToolItem item = items [ index ] ; if ( ( ( item . style ) & ( SWT . DROP_DOWN ) ) != 0 ) { Event event = new Event ( ) ; event . detail = SWT . ARROW ; int topHandle = item . topHandle ( ) ; event . x = OS . GTK_WIDGET_X ( topHandle ) ; event . y = ( OS . GTK_WIDGET_Y ( topHandle ) ) + ( OS . GTK_WIDGET_HEIGHT ( topHandle ) ) ; item . postEvent ( Selection , event ) ; return result ; } } } case OS . GDK_Right : next = true ; break ; default : return result ; } int start = index ; int offset = ( next ) ? 1 : - 1 ; while ( ( index = ( ( index + offset ) + length ) % length ) != start ) { ToolItem item = items [ index ] ; <START_BUG> if ( ( OS . gtk_widget_get_child_visible ( item . handle ) ) && ( item . setFocus ( ) ) ) <END_BUG> return result ; } return result ; } boolean hasFocus ( ) { } public int indexOf ( ToolItem item ) { } void layoutItems ( ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } void releaseWidget ( ) { } void removeControl ( Control control ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } void setFontDescription ( int font ) { } void setForegroundColor ( GdkColor color ) { } public void setToolTipText ( String string ) { } }

Fix:
if ( item . setFocus ( ) )
Buggy code:
public class BookmarkablePageLinkTest extends WicketTestCase { public BookmarkablePageLinkTest ( String name ) { } public void testBookmarkableRequest ( ) throws Exception { } public void testBookmarkableRequestWithIntercept ( ) throws Exception { } public void testBookmarkableRequestWithInterceptWithParams ( ) throws Exception { if ( true ) return ; PageParameters pp = new PageParameters ( ) ; <START_BUG> pp . setNamedParameter ( "test" , "test" ) ; <END_BUG> tester . startPage ( BookmarkableThrowsInterceptPage . class , pp ) ; assertEquals ( tester . getLastRenderedPage ( ) . getClass ( ) , BookmarkableSetSecurityPage . class ) ; tester . startPage ( BookmarkableContinueToPage . class ) ; assertEquals ( tester . getLastRenderedPage ( ) . getClass ( ) , BookmarkableThrowsInterceptPage . class ) ; } }

Fix:
pp . set ( "test" , "test" ) ;
Buggy code:
public class SchematicEntity extends Schematic { public Class < ? extends Entity > entity ; public NBTTagCompound entityNBT = new NBTTagCompound ( ) ; public ItemStack [ ] storedRequirements = new ItemStack [ 0 ] ; public BuildingPermission defaultPermission = BuildingPermission . ALL ; @ Override public void getRequirementsForPlacement ( IBuilderContext context , List < ItemStack > requirements ) { } public void writeToWorld ( IBuilderContext context ) { } public void readFromWorld ( IBuilderContext context , Entity entity ) { } @ Override public void translateToBlueprint ( Vec3d transform ) { } @ Override public void translateToWorld ( Vec3d transform ) { } @ Override public void idsToBlueprint ( MappingRegistry registry ) { } @ Override public void idsToWorld ( MappingRegistry registry ) { } @ Override public void rotateLeft ( IBuilderContext context ) { } @ Override public void writeSchematicToNBT ( NBTTagCompound nbt , MappingRegistry registry ) { } @ Override public void readSchematicFromNBT ( NBTTagCompound nbt , MappingRegistry registry ) { super . readSchematicFromNBT ( nbt , registry ) ; entityNBT = nbt . getCompoundTag ( "entity" ) ; NBTTagList rq = nbt . getTagList ( "rq" , TAG_COMPOUND ) ; ArrayList < ItemStack > rqs = new ArrayList < ItemStack > ( ) ; for ( int i = 0 ; i < ( rq . tagCount ( ) ) ; ++ i ) { try { NBTTagCompound sub = rq . getCompoundTagAt ( i ) ; if ( ( sub . getInteger ( "id" ) ) >= 0 ) { <START_BUG> sub . setInteger ( "id" , itemRegistry . getIDForObject ( registry . getItemForId ( sub . getInteger ( "id" ) ) ) ) ; <END_BUG> rqs . add ( ItemStack . loadItemStackFromNBT ( sub ) ) ; } else { defaultPermission = BuildingPermission . CREATIVE_ONLY ; } } catch ( Throwable t ) { t . printStackTrace ( ) ; defaultPermission = BuildingPermission . CREATIVE_ONLY ; } } storedRequirements = rqs . toArray ( new ItemStack [ rqs . size ( ) ] ) ; } protected NBTTagList newDoubleNBTList ( double ... par1ArrayOfDouble ) { } protected NBTTagList newFloatNBTList ( float ... par1ArrayOfFloat ) { } public boolean isAlreadyBuilt ( IBuilderContext context ) { } @ Override public int buildTime ( ) { } @ Override public BuildingPermission getBuildingPermission ( ) { } }

Fix:
sub . setInteger ( "id" , REGISTRY . getIDForObject ( registry . getItemForId ( sub . getInteger ( "id" ) ) ) ) ;
Buggy code:
public class SimpleLayout extends Layout { StringBuffer sbuf = new StringBuffer ( 128 ) ; public SimpleLayout ( ) { } public void activateOptions ( ) { } public String format ( LoggingEvent event ) { sbuf . setLength ( 0 ) ; <START_BUG> sbuf . append ( event . level . toString ( ) ) ; <END_BUG> sbuf . append ( "<seq2seq4repair_space>-<seq2seq4repair_space>" ) ; sbuf . append ( event . getRenderedMessage ( ) ) ; sbuf . append ( Layout . LINE_SEP ) ; return sbuf . toString ( ) ; } public boolean ignoresThrowable ( ) { } }

Fix:
sbuf . append ( event . getLevel ( ) . toString ( ) ) ;
Buggy code:
public class PowellOptimizerTest { @ Test public void testSumSinc ( ) { final MultivariateFunction func = new SumSincFunction ( ( - 1 ) ) ; int dim = 2 ; final double [ ] minPoint = new double [ dim ] ; for ( int i = 0 ; i < dim ; i ++ ) { minPoint [ i ] = 0 ; } double [ ] init = new double [ dim ] ; for ( int i = 0 ; i < dim ; i ++ ) { init [ i ] = minPoint [ i ] ; } doTest ( func , minPoint , init , MINIMIZE , 1.0E-9 , 1.0E-7 ) ; for ( int i = 0 ; i < dim ; i ++ ) { init [ i ] = ( minPoint [ i ] ) + 3 ; } <START_BUG> doTest ( func , minPoint , init , MINIMIZE , 1.0E-9 , 1.0E-7 ) ; <END_BUG> } @ Test public void testQuadratic ( ) { } @ Test public void testMaximizeQuadratic ( ) { } @ Test public void testRelativeToleranceOnScaledValues ( ) { } private void doTest ( MultivariateFunction func , double [ ] optimum , double [ ] init , GoalType goal , double fTol , double pointTol ) { } }

Fix:
doTest ( func , minPoint , init , MINIMIZE , 1.0E-9 , 1.0E-5 ) ;
Buggy code:
final class HalfOpenState extends CircuitBreakerState { private CircuitBreakerMetrics circuitBreakerMetrics ; private final float failureRateThreshold ; HalfOpenState ( CircuitBreakerStateMachine stateMachine ) { } @ Override boolean isCallPermitted ( ) { } @ Override void recordFailure ( ) { } @ Override void recordSuccess ( ) { } private void checkFailureRate ( float currentFailureRate ) { if ( currentFailureRate != ( - 1 ) ) { <START_BUG> if ( currentFailureRate > ( failureRateThreshold ) ) { <END_BUG> stateMachine . transitionToOpenState ( HALF_OPEN_TO_OPEN , circuitBreakerMetrics ) ; } else { stateMachine . transitionToClosedState ( HALF_OPEN_TO_CLOSED ) ; } } } @ Override State getState ( ) { } @ Override Metrics getMetrics ( ) { } }

Fix:
if ( currentFailureRate >= ( failureRateThreshold ) ) {
Buggy code:
public class Echo extends Task { protected String message = "" ; protected File file = null ; protected boolean append = false ; protected int logLevel = Project . MSG_WARN ; public void execute ( ) throws BuildException { } public void setMessage ( String msg ) { } public void setFile ( File file ) { } public void setAppend ( boolean append ) { } public void addText ( String msg ) { <START_BUG> message += project . replaceProperties ( msg ) ; <END_BUG> } public void setLevel ( Echo . EchoLevel echoLevel ) { } public static class EchoLevel extends EnumeratedAttribute { public String [ ] getValues ( ) { } } }

Fix:
message += getProject ( ) . replaceProperties ( msg ) ;
Buggy code:
public class TestTopScoreDocCollector extends LuceneTestCase { public TestTopScoreDocCollector ( ) { } public TestTopScoreDocCollector ( String name ) { } public void testOutOfOrderCollection ( ) throws Exception { Directory dir = new RAMDirectory ( ) ; IndexWriter writer = new IndexWriter ( dir , null , MaxFieldLength . UNLIMITED ) ; for ( int i = 0 ; i < 10 ; i ++ ) { writer . addDocument ( new Document ( ) ) ; } writer . commit ( ) ; writer . close ( ) ; boolean [ ] inOrder = new boolean [ ] { false , true } ; String [ ] actualTSDCClass = new String [ ] { "OutOfOrderTopScoreDocCollector" , "InOrderTopScoreDocCollector" } ; boolean origVal = BooleanQuery . getAllowDocsOutOfOrder ( ) ; BooleanQuery . setAllowDocsOutOfOrder ( true ) ; BooleanQuery bq = new BooleanQuery ( ) ; bq . add ( new MatchAllDocsQuery ( ) , SHOULD ) ; bq . setMinimumNumberShouldMatch ( 1 ) ; try { <START_BUG> IndexSearcher searcher = new IndexSearcher ( dir ) ; <END_BUG> for ( int i = 0 ; i < ( inOrder . length ) ; i ++ ) { TopDocsCollector tdc = TopScoreDocCollector . create ( 3 , inOrder [ i ] ) ; assertEquals ( ( "org.apache.lucene.search.TopScoreDocCollector$" + ( actualTSDCClass [ i ] ) ) , tdc . getClass ( ) . getName ( ) ) ; searcher . search ( new MatchAllDocsQuery ( ) , tdc ) ; ScoreDoc [ ] sd = tdc . topDocs ( ) . scoreDocs ; assertEquals ( 3 , sd . length ) ; for ( int j = 0 ; j < ( sd . length ) ; j ++ ) { assertEquals ( ( ( ( "expected<seq2seq4repair_space>doc<seq2seq4repair_space>Id<seq2seq4repair_space>" + j ) + "<seq2seq4repair_space>found<seq2seq4repair_space>" ) + ( sd [ j ] . doc ) ) , j , sd [ j ] . doc ) ; } } } finally { BooleanQuery . setAllowDocsOutOfOrder ( origVal ) ; } } }

Fix:
IndexSearcher searcher = new IndexSearcher ( dir , true ) ;
Buggy code:
public class TacoSuccessCheckStrategy implements SuccessCheckStrategy { public boolean isSuccessful ( FixCandidate s ) { if ( s == null ) throw new IllegalArgumentException ( "null<seq2seq4repair_space>fix<seq2seq4repair_space>candidate" ) ; if ( ( s . program ) == null ) throw new IllegalArgumentException ( "null<seq2seq4repair_space>program<seq2seq4repair_space>in<seq2seq4repair_space>fix<seq2seq4repair_space>candidate" ) ; if ( ! ( copy ( s . program . getFilePath ( ) , ( ( ( StrykerConfig . getInstance ( ) . getCompilingSandbox ( ) ) + ( s . program . getClassName ( ) . replaceAll ( "\\." , StrykerConfig . getInstance ( ) . getFileSeparator ( ) ) ) ) + ".java" ) ) ) ) { System . err . println ( ( ( ( "couldn't<seq2seq4repair_space>copy<seq2seq4repair_space>" + ( s . program . getFilePath ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( StrykerConfig . getInstance ( ) . getCompilingSandbox ( ) ) ) ) ; return false ; } String sourceFolderBackup = s . program . getSourceFolder ( ) ; s . program . moveLocation ( StrykerConfig . getInstance ( ) . getCompilingSandbox ( ) ) ; String [ ] classpathToCompile = new String [ ] { StrykerConfig . getInstance ( ) . getCompilingSandbox ( ) } ; if ( ! ( JavaCompilerAPI . getInstance ( ) . compile ( ( ( ( StrykerConfig . getInstance ( ) . getCompilingSandbox ( ) ) + ( s . getProgram ( ) . getClassNameAsPath ( ) ) ) + ".java" ) , classpathToCompile ) ) ) { <START_BUG> System . err . println ( "error<seq2seq4repair_space>al<seq2seq4repair_space>compilar<seq2seq4repair_space>el<seq2seq4repair_space>FixCandidate!" ) ; <END_BUG> return false ; } JavaCompilerAPI . getInstance ( ) . updateReloaderClassPath ( classpathToCompile ) ; JavaCompilerAPI . getInstance ( ) . reloadClass ( s . getProgram ( ) . getClassName ( ) ) ; ClassLoader classLoaderBackup = Thread . currentThread ( ) . getContextClassLoader ( ) ; Thread . currentThread ( ) . setContextClassLoader ( JavaCompilerAPI . getInstance ( ) . getReloader ( ) ) ; if ( ! ( s . program . isValid ( ) ) ) return false ; boolean error = false ; boolean sat = false ; try { sat = TacoAPI . getInstance ( ) . isSAT ( s ) ; } catch ( TacoNotImplementedYetException e ) { error = true ; } catch ( JDynAlloySemanticException e ) { error = true ; } s . program . moveLocation ( sourceFolderBackup ) ; Thread . currentThread ( ) . setContextClassLoader ( classLoaderBackup ) ; return ( ! sat ) && ( ! error ) ; } private boolean copy ( String srcPath , String destPath ) { } }

Fix:
System . err . println ( "error<seq2seq4repair_space>while<seq2seq4repair_space>compiling<seq2seq4repair_space>FixCandidate!" ) ;
Buggy code:
class PackageFragmentRootInfo extends OpenableElementInfo { protected SourceMapper sourceMapper = null ; protected int fRootKind = IPackageFragmentRoot . K_SOURCE ; protected Object [ ] fNonJavaResources ; public PackageFragmentRootInfo ( ) { } static Object [ ] computeFolderNonJavaResources ( JavaProject project , IContainer folder , char [ ] [ ] exclusionPatterns ) throws JavaModelException { Object [ ] nonJavaResources = new IResource [ 5 ] ; int nonJavaResourcesCounter = 0 ; try { IClasspathEntry [ ] classpath = project . getResolvedClasspath ( true ) ; IResource [ ] members = folder . members ( ) ; nextResource : for ( int i = 0 , max = members . length ; i < max ; i ++ ) { IResource member = members [ i ] ; switch ( member . getType ( ) ) { case IResource . FILE : String fileName = member . getName ( ) ; if ( ( Util . isValidCompilationUnitName ( fileName ) ) && ( ! ( Util . isExcluded ( member , exclusionPatterns ) ) ) ) continue nextResource ; if ( Util . isValidClassFileName ( fileName ) ) continue nextResource ; <START_BUG> if ( ( Util . isArchiveFileName ( fileName ) ) && ( PackageFragmentRootInfo . isClasspathEntry ( member . getFullPath ( ) , classpath ) ) ) <END_BUG> continue nextResource ; break ; case IResource . FOLDER : if ( ( Util . isValidFolderNameForPackage ( member . getName ( ) ) ) && ( ( ! ( Util . isExcluded ( member , exclusionPatterns ) ) ) || ( PackageFragmentRootInfo . isClasspathEntry ( member . getFullPath ( ) , classpath ) ) ) ) continue nextResource ; break ; } if ( ( nonJavaResources . length ) == nonJavaResourcesCounter ) { System . arraycopy ( nonJavaResources , 0 , ( nonJavaResources = new IResource [ nonJavaResourcesCounter * 2 ] ) , 0 , nonJavaResourcesCounter ) ; } nonJavaResources [ ( nonJavaResourcesCounter ++ ) ] = member ; } if ( ( nonJavaResources . length ) != nonJavaResourcesCounter ) { System . arraycopy ( nonJavaResources , 0 , ( nonJavaResources = new IResource [ nonJavaResourcesCounter ] ) , 0 , nonJavaResourcesCounter ) ; } return nonJavaResources ; } catch ( CoreException e ) { throw new JavaModelException ( e ) ; } } private Object [ ] computeNonJavaResources ( IJavaProject project , IResource underlyingResource , PackageFragmentRoot handle ) { } synchronized Object [ ] getNonJavaResources ( IJavaProject project , IResource underlyingResource , PackageFragmentRoot handle ) { } public int getRootKind ( ) { } protected SourceMapper getSourceMapper ( ) { } private static boolean isClasspathEntry ( IPath path , IClasspathEntry [ ] resolvedClasspath ) { } void setNonJavaResources ( Object [ ] resources ) { } protected void setRootKind ( int newRootKind ) { } protected void setSourceMapper ( SourceMapper mapper ) { } }

Fix:
if ( ( org . eclipse . jdt . internal . compiler . util . Util . isArchiveFileName ( fileName ) ) && ( PackageFragmentRootInfo . isClasspathEntry ( member . getFullPath ( ) , classpath ) ) )
Buggy code:
class RvmUtil { public static Rvm getDefaultRvm ( ) { } public static RubyInstallation [ ] getRvmRubies ( Rvm rvm ) { } private static String buildGemPath ( String currentGem , FilePath global , Collection < FilePath > candidateGems ) throws IOException , InterruptedException { } private static FilePath getGlobal ( String name , FilePath gemsPath ) throws IOException , InterruptedException { } private static FilePath getSpecifications ( FilePath candidate ) throws IOException , InterruptedException { } private static class RvmFilenameFilter implements FileFilter , Serializable { private final String name ; public RvmFilenameFilter ( String name ) { } public boolean accept ( File pathname ) { } } private static class RvmGlobalFilter implements FileFilter , Serializable { private final String name ; public RvmGlobalFilter ( String name ) { } public boolean accept ( File pathname ) { } } private static class RakeSpecFilter implements FileFilter , Serializable { private final Pattern rakePattern = Pattern . compile ( "rake\\-([\\d.]+).gemspec" ) ; public boolean accept ( File pathname ) { } } private static Collection < FilePath > getRakeSpecifications ( FilePath specifications ) throws IOException , InterruptedException { Collection < FilePath > rakeSpecs = new LinkedHashSet < FilePath > ( ) ; <START_BUG> FilePath specs = specifications . list ( RvmUtil . rakeFilter ) ; <END_BUG> if ( specs != null ) { rakeSpecs . addAll ( specs ) ; } for ( FilePath subDirectory : specifications . listDirectories ( ) ) { specs = subDirectory . list ( RvmUtil . rakeFilter ) ; if ( specs != null ) { rakeSpecs . addAll ( specs ) ; } } return rakeSpecs ; } private static FileFilter rakeFilter = new RvmUtil . RakeSpecFilter ( ) ; }

Fix:
List < FilePath > specs = specifications . list ( RvmUtil . rakeFilter ) ;
Buggy code:
public class UserTemplate extends AbstractViadeoOperations implements UserOperations { public UserTemplate ( ViadeoTemplate viadeoTemplate , boolean isAuthorized ) { } @ Override public ViadeoProfile getUserProfile ( ) { } @ Override public ViadeoProfile getUserProfile ( String userId ) { } @ Override public List < ViadeoProfile > getContacts ( ) { } @ Override public List < ViadeoProfile > getContacts ( int page ) { } @ Override public List < ViadeoProfile > getContacts ( String userId ) { <START_BUG> return getContacts ( userId , 0 ) ; <END_BUG> } @ Override public List < ViadeoProfile > getContacts ( String userId , int page ) { } @ Override public List < News > getNewsFeed ( ) { } @ Override public List < News > getNewsFeed ( String userId ) { } @ Override public List < News > getUserFeed ( ) { } @ Override public List < News > getUserFeed ( String userId ) { } @ Override public List < Experience > getExperiences ( ) { } @ Override public List < Experience > getExperiences ( String userId ) { } @ Override public void updateStatus ( String status ) { } @ Override public List < ViadeoProfile > search ( String keyword ) { } @ Override public List < ContactCards > getContactCards ( String userId ) { } @ Override public List < ContactCards > getContactCards ( ) { } @ Override public List < InboxMessage > getInboxMessages ( ) { } }

Fix:
return getContacts ( userId , 1 ) ;
Buggy code:
public class SyntheticRequest extends PartitionClientRequest { private int partitionId ; private int syncBackupCount ; private int asyncBackupCount ; private long backupDelayNanos ; private String serviceName ; public SyntheticRequest ( ) { } public SyntheticRequest ( int syncBackupCount , int asyncBackupCount , long backupDelayNanos , String serviceName ) { } public void setPartitionId ( int partitionId ) { } @ Override protected Operation prepareOperation ( ) { <START_BUG> SyntheticOperation op = new SyntheticOperation ( syncBackupCount , asyncBackupCount , backupDelayNanos ) ; <END_BUG> op . setPartitionId ( partitionId ) ; return op ; } @ Override protected int getPartition ( ) { } @ Override public String getServiceName ( ) { } @ Override public int getFactoryId ( ) { } @ Override public int getClassId ( ) { } @ Override public Permission getRequiredPermission ( ) { } @ Override public void write ( PortableWriter writer ) throws IOException { } @ Override public void read ( PortableReader reader ) throws IOException { } }

Fix:
SyntheticOperation op = new SyntheticOperation ( ( ( byte ) ( syncBackupCount ) ) , ( ( byte ) ( asyncBackupCount ) ) , backupDelayNanos ) ;
Buggy code:
public class TestNorms extends LuceneTestCase { private class SimilarityOne extends DefaultSimilarity { @ Override public float lengthNorm ( String fieldName , int numTerms ) { } } private static final int NUM_FIELDS = 10 ; private Similarity similarityOne ; private Analyzer anlzr ; private int numDocNorms ; private ArrayList norms ; private ArrayList modifiedNorms ; private float lastNorm = 0 ; private float normDelta = ( ( float ) ( 0.001 ) ) ; public TestNorms ( String s ) { } @ Override protected void setUp ( ) throws Exception { super . setUp ( ) ; similarityOne = new TestNorms . SimilarityOne ( ) ; <START_BUG> anlzr = new org . apache . lucene . analysis . standard . StandardAnalyzer ( Version . LUCENE_CURRENT ) ; <END_BUG> } public void testNorms ( ) throws IOException { } private void doTestNorms ( Directory dir ) throws IOException { } private void createIndex ( Directory dir ) throws IOException { } private void modifyNormsForF1 ( Directory dir ) throws IOException { } private void verifyIndex ( Directory dir ) throws IOException { } private void addDocs ( Directory dir , int ndocs , boolean compound ) throws IOException { } private Document newDoc ( ) { } private float nextNorm ( ) { } }

Fix:
anlzr = new org . apache . lucene . analysis . standard . StandardAnalyzer ( TEST_VERSION_CURRENT ) ;