nus-yam/ex-repair huggingface dataset:
Buggy code:
public class MockPortletContext implements PortletContext { private static final String TEMP_DIR_SYSTEM_PROPERTY = "java.io.tmpdir" ; private final Log logger = LogFactory . getLog ( getClass ( ) ) ; private final String resourceBasePath ; private final ResourceLoader resourceLoader ; private final Map < String , Object > attributes = new LinkedHashMap < String , Object > ( ) ; private final Map < String , String > initParameters = new LinkedHashMap < String , String > ( ) ; private String portletContextName = "MockPortletContext" ; private Set < String > containerRuntimeOptions = new LinkedHashSet < String > ( ) ; public MockPortletContext ( ) { } public MockPortletContext ( String resourceBasePath ) { } public MockPortletContext ( ResourceLoader resourceLoader ) { } public MockPortletContext ( String resourceBasePath , ResourceLoader resourceLoader ) { } protected String getResourceLocation ( String path ) { } public String getServerInfo ( ) { } public PortletRequestDispatcher getRequestDispatcher ( String path ) { } public PortletRequestDispatcher getNamedDispatcher ( String path ) { } public InputStream getResourceAsStream ( String path ) { } public int getMajorVersion ( ) { <START_BUG> return 1 ; <END_BUG> } public int getMinorVersion ( ) { } public String getMimeType ( String filePath ) { } public String getRealPath ( String path ) { } public Set < String > getResourcePaths ( String path ) { } public URL getResource ( String path ) throws MalformedURLException { } public Object getAttribute ( String name ) { } public Enumeration < String > getAttributeNames ( ) { } public void setAttribute ( String name , Object value ) { } public void removeAttribute ( String name ) { } public void addInitParameter ( String name , String value ) { } public String getInitParameter ( String name ) { } public Enumeration < String > getInitParameterNames ( ) { } public void log ( String message ) { } public void log ( String message , Throwable t ) { } public void setPortletContextName ( String portletContextName ) { } public String getPortletContextName ( ) { } public void addContainerRuntimeOption ( String key ) { } public Enumeration < String > getContainerRuntimeOptions ( ) { } }

Fix:
return 2 ;
Buggy code:
public class FlatClassStrategy extends AbstractClassStrategy { public static final String ALIAS = "flat" ; private static final Localizer _loc = Localizer . forPackage ( FlatClassStrategy . class ) ; public String getAlias ( ) { } public void map ( boolean adapt ) { ClassMapping sup = cls . getMappedPCSuperclassMapping ( ) ; if ( ( sup == null ) || ( ( cls . getEmbeddingMetaData ( ) ) != null ) ) throw new org . apache . openjpa . util . MetaDataException ( FlatClassStrategy . _loc . get ( "not-sub" , cls ) ) ; ClassMappingInfo info = cls . getMappingInfo ( ) ; info . assertNoSchemaComponents ( cls , true ) ; if ( ( info . getTableName ( ) ) != null ) { <START_BUG> Table table = info . createTable ( cls , null , null , info . getTableName ( ) , false ) ; <END_BUG> if ( table != ( sup . getTable ( ) ) ) throw new org . apache . openjpa . util . MetaDataException ( FlatClassStrategy . _loc . get ( "flat-table" , cls , table . getFullName ( ) , sup . getTable ( ) . getFullName ( ) ) ) ; } cls . setTable ( sup . getTable ( ) ) ; cls . setPrimaryKeyColumns ( sup . getPrimaryKeyColumns ( ) ) ; cls . setColumnIO ( sup . getColumnIO ( ) ) ; } public boolean isPrimaryKeyObjectId ( boolean hasAll ) { } }

Fix:
Table table = info . createTable ( cls , null , info . getSchemaName ( ) , info . getTableName ( ) , false ) ;
Buggy code:
public class SplitsInClientOptionParser { private CommandLine cmdLine ; private String [ ] otherArgs ; private boolean parsed = false ; public SplitsInClientOptionParser ( ) { } public String [ ] getRemainingArgs ( ) { Preconditions . checkState ( parsed , "Cannot<seq2seq4repair_space>get<seq2seq4repair_space>remaining<seq2seq4repair_space>args<seq2seq4repair_space>without<seq2seq4repair_space>parsing" ) ; <START_BUG> return otherArgs ; <END_BUG> } @ SuppressWarnings ( "static-access" ) public boolean parse ( String [ ] args , boolean defaultVal ) throws ParseException { } }

Fix:
return otherArgs . clone ( ) ;
Buggy code:
public class ServletInvocableHandlerMethod extends InvocableHandlerMethod { private HttpStatus responseStatus ; private String responseReason ; private HandlerMethodReturnValueHandlerComposite returnValueHandlers ; public void setHandlerMethodReturnValueHandlers ( HandlerMethodReturnValueHandlerComposite returnValueHandlers ) { } public ServletInvocableHandlerMethod ( Object handler , Method method ) { } public final void invokeAndHandle ( NativeWebRequest request , ModelAndViewContainer mavContainer , Object ... providedArgs ) throws Exception { } private void setResponseStatus ( ServletWebRequest webRequest ) throws IOException { if ( ( this . responseStatus ) != null ) { if ( StringUtils . hasText ( this . responseReason ) ) { webRequest . getResponse ( ) . sendError ( this . responseStatus . value ( ) , this . responseReason ) ; } else { <START_BUG> webRequest . getResponse ( ) . sendError ( this . responseStatus . value ( ) ) ; <END_BUG> } webRequest . getRequest ( ) . setAttribute ( RESPONSE_STATUS_ATTRIBUTE , this . responseStatus ) ; } } private boolean isRequestNotModified ( NativeWebRequest request ) { } private boolean hasResponseStatus ( ) { } }

Fix:
webRequest . getResponse ( ) . setStatus ( this . responseStatus . value ( ) ) ;
Buggy code:
public class CompositeState extends State { public boolean _isConcurent ; public Vector _substate ; public CompositeState ( ) { } public CompositeState ( Name name ) { } public CompositeState ( String nameStr ) { } public boolean getIsConcurent ( ) { } public void setIsConcurent ( boolean x ) throws PropertyVetoException { } public Vector getSubstate ( ) { } public void setSubstate ( Vector x ) throws PropertyVetoException { if ( ( _substate ) == null ) _substate = new Vector ( ) ; <START_BUG> fireVetoableChange ( "substate" , _substate , x ) ; <END_BUG> _substate = x ; util . Enumeration = _substate . elements ( ) ; } public void addSubstate ( StateVertex x ) throws PropertyVetoException { } public void removeSubstate ( StateVertex x ) throws PropertyVetoException { } public String dbgString ( ) { } }

Fix:
fireVetoableChangeNoCompare ( "substate" , _substate , x ) ;
Buggy code:
public abstract class DiscoveryTestHelper { public static final int WEIGHT = 43 ; public static final int PRIORITY = 42 ; public static final String SERVICENAME = "aServiceNAME" ; public static final String NAMINGAUTHORITY = "someNamingAuthority" ; public static final String SCOPE = "someScope" ; public static final String PROTOCOL = "someProtocol" ; public static final int PORT = 3282 ; public static final String USERNAME = System . getProperty ( "user.name" , "testuser" ) ; public static final String PASSWORD = "testpassword" ; public static final String PATH = "//a//Path//to//Something" ; public static final String QUERY = "someQuery" ; public static final String FRAGMENT = "aFragment" ; public static final String [ ] SERVICES = new String [ ] { "ecf" , "junit" , "tests" } ; public static final String [ ] PROTOCOLS = new String [ ] { DiscoveryTestHelper . PROTOCOL } ; public static final String SERVICE_TYPE = ( ( ( ( ( ( ( ( ( ( "_" + ( DiscoveryTestHelper . SERVICES [ 0 ] ) ) + "._" ) + ( DiscoveryTestHelper . SERVICES [ 1 ] ) ) + "._" ) + ( DiscoveryTestHelper . SERVICES [ 2 ] ) ) + "._" ) + ( DiscoveryTestHelper . PROTOCOL ) ) + "." ) + ( DiscoveryTestHelper . SCOPE ) ) + "._" ) + ( DiscoveryTestHelper . NAMINGAUTHORITY ) ; public static URI createDefaultURI ( ) { <START_BUG> return URI . create ( ( ( ( ( ( ( ( ( DiscoveryTestHelper . PROTOCOLS [ 0 ] ) + ":////" ) + ( DiscoveryTestHelper . USERNAME ) ) + "@" ) + ( DiscoveryTestHelper . getHost ( ) ) ) + ":" ) + ( DiscoveryTestHelper . PORT ) ) + ( DiscoveryTestHelper . PATH ) ) ) ; <END_BUG> } public static String getHost ( ) { } }

Fix:
return URI . create ( ( ( ( ( ( ( DiscoveryTestHelper . PROTOCOLS [ 0 ] ) + ":////" ) + ( DiscoveryTestHelper . getHost ( ) ) ) + ":" ) + ( DiscoveryTestHelper . PORT ) ) + ( DiscoveryTestHelper . PATH ) ) ) ;
Buggy code:
public class IncrementalTableNavigationTest extends TestCase { public IncrementalTableNavigationTest ( ) { } public IncrementalTableNavigationTest ( String name ) { } public void testPagedTable ( ) throws Exception { MockHttpApplication application = new MockHttpApplication ( null ) ; <START_BUG> application . getSettings ( ) . setHomePage ( IncrementalTableNavigationPage . class ) ; <END_BUG> application . setupRequestAndResponse ( ) ; application . processRequestCycle ( ) ; IncrementalTableNavigationPage page = ( ( IncrementalTableNavigationPage ) ( application . getLastRenderedPage ( ) ) ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validatePage1 ( document ) ) ; Link link = ( ( Link ) ( page . get ( "nextNext" ) ) ) ; application . setupRequestAndResponse ( ) ; application . getServletRequest ( ) . setRequestToComponent ( link ) ; application . processRequestCycle ( ) ; document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validatePage2 ( document ) ) ; link = ( ( Link ) ( page . get ( "prev" ) ) ) ; application . setupRequestAndResponse ( ) ; application . getServletRequest ( ) . setRequestToComponent ( link ) ; application . processRequestCycle ( ) ; document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validatePage3 ( document ) ) ; } private boolean validatePage1 ( String document ) { } private boolean validatePage2 ( String document ) { } private boolean validatePage3 ( String document ) { } }

Fix:
application . getPages ( ) . setHomePage ( IncrementalTableNavigationPage . class ) ;
Buggy code:
public class MediaPlayerSource implements AudioSource { public static String TAG = MediaPlayerSource . class . getName ( ) ; MediaPlayer mySource ; public MediaPlayerSource ( Context context , int raw_sound_file ) { } public MediaPlayerSource ( Context context , Uri uri ) { } public void destroy ( ) { } @ Override public void playAudio ( ) { } @ Override public void stopAudio ( ) { } public void rewind ( ) { <START_BUG> mySource . reset ( ) ; <END_BUG> } public void setOnCompletionListener ( MediaPlayer . OnCompletionListener listener ) { } }

Fix:
mySource . seekTo ( 0 ) ;
Buggy code:
public class YacunaMarketDataDemo { public static void main ( String [ ] args ) throws Exception { YacunaExchange exchange = new YacunaExchange ( ) ; exchange . applySpecification ( exchange . getDefaultExchangeSpecification ( ) ) ; YacunaMarketDataService marketDataService = ( ( YacunaMarketDataService ) ( exchange . getPollingMarketDataService ( ) ) ) ; <START_BUG> Ticker ticker = marketDataService . getTicker ( new CurrencyPair ( "EUR" , "XBT" ) ) ; <END_BUG> System . out . println ( ticker . toString ( ) ) ; } }

Fix:
Ticker ticker = marketDataService . getTicker ( new CurrencyPair ( "XBT" , "EUR" ) ) ;
Buggy code:
public abstract class OperatingSystem { public abstract String getInstallDirectory ( String name , String version ) { } public abstract static class OSTask { protected Install installer ; protected String name ; protected String label ; protected String directory ; protected boolean enabled ; public OSTask ( Install installer , String name ) { } public String getName ( ) { } public String getLabel ( ) { } public String getDefaultDirectory ( Install installer ) { } public String getDirectory ( ) { } public boolean isEnabled ( ) { } public void setEnabled ( boolean enabled ) { } public void setDirectory ( String directory ) { } public abstract void perform ( String installDir , Vector filesets ) throws IOException { } } public OperatingSystem . OSTask [ ] getOSTasks ( Install installer ) { return new OperatingSystem . OSTask [ 0 ] ; } public void mkdirs ( String directory ) throws IOException { } public static OperatingSystem getOperatingSystem ( ) { } public static class Unix extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } public class ScriptOSTask extends OperatingSystem . OSTask { public ScriptOSTask ( Install installer ) { } public String getDefaultDirectory ( Install installer ) { } public void perform ( String installDir , Vector filesets ) throws IOException { } } public class ManPageOSTask extends OperatingSystem . OSTask { public ManPageOSTask ( Install installer ) { } public String getDefaultDirectory ( Install installer ) { } public void perform ( String installDir , Vector filesets ) throws IOException { } } public OperatingSystem . OSTask [ ] getOSTasks ( Install installer ) { return new OperatingSystem . OSTask [ ] { new OperatingSystem . Unix . ScriptOSTask ( installer ) , new OperatingSystem . Unix . ManPageOSTask ( installer ) } ; } public void mkdirs ( String directory ) throws IOException { } public void exec ( String [ ] args ) throws IOException { } } public static class MacOS extends OperatingSystem . Unix { public String getInstallDirectory ( String name , String version ) { } } public static class Windows extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } public class JEditLauncherOSTask extends OperatingSystem . OSTask { public JEditLauncherOSTask ( Install installer ) { } public String getDefaultDirectory ( Install installer ) { } public void perform ( String installDir , Vector filesets ) { } } public OperatingSystem . OSTask [ ] getOSTasks ( Install installer ) { <START_BUG> return new OperatingSystem . OSTask [ ] { new OperatingSystem . Windows . JEditLauncherOSTask ( installer ) } ; <END_BUG> } } public static class HalfAnOS extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } } public static class VMS extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } } private static OperatingSystem os ; }

Fix:
return new OperatingSystem . OSTask [ ] { } ;
Buggy code:
public class BatchRemoveLineHandler extends CommandHandlerWithHelp { public BatchRemoveLineHandler ( ) { } @ Override public boolean isAvailable ( CommandContext ctx ) { } @ Override protected void doHandle ( CommandContext ctx ) throws CommandFormatException { BatchManager batchManager = ctx . getBatchManager ( ) ; if ( ! ( batchManager . isBatchActive ( ) ) ) { ctx . printLine ( "No<seq2seq4repair_space>active<seq2seq4repair_space>batch." ) ; return ; } Batch batch = batchManager . getActiveBatch ( ) ; final int batchSize = batch . size ( ) ; if ( batchSize == 0 ) { ctx . printLine ( "The<seq2seq4repair_space>batch<seq2seq4repair_space>is<seq2seq4repair_space>empty." ) ; return ; } <START_BUG> List < String > arguments = ctx . getParsedArguments ( ) . getOtherArguments ( ) ; <END_BUG> if ( arguments . isEmpty ( ) ) { ctx . printLine ( "Missing<seq2seq4repair_space>line<seq2seq4repair_space>number." ) ; return ; } if ( ( arguments . size ( ) ) != 1 ) { ctx . printLine ( ( "Expected<seq2seq4repair_space>only<seq2seq4repair_space>one<seq2seq4repair_space>argument<seq2seq4repair_space>-<seq2seq4repair_space>the<seq2seq4repair_space>line<seq2seq4repair_space>number<seq2seq4repair_space>but<seq2seq4repair_space>received:<seq2seq4repair_space>" + arguments ) ) ; return ; } String intStr = arguments . get ( 0 ) ; int lineNumber ; try { lineNumber = Integer . parseInt ( intStr ) ; } catch ( NumberFormatException e ) { ctx . printLine ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>line<seq2seq4repair_space>number<seq2seq4repair_space>'" + intStr ) + "':<seq2seq4repair_space>" ) + ( e . getLocalizedMessage ( ) ) ) ) ; return ; } if ( ( lineNumber < 1 ) || ( lineNumber > batchSize ) ) { ctx . printLine ( ( ( ( lineNumber + "<seq2seq4repair_space>isn't<seq2seq4repair_space>in<seq2seq4repair_space>range<seq2seq4repair_space>[1.." ) + batchSize ) + "]." ) ) ; return ; } batch . remove ( ( lineNumber - 1 ) ) ; } @ Override public boolean hasArgument ( int index ) { } }

Fix:
List < String > arguments = ctx . getParsedArguments ( ) . getOtherProperties ( ) ;
Buggy code:
public class TableColumn extends Item { static final int IMAGE_PART = 0 ; static final int TEXT_PART = 1 ; int headerHandle ; int stringPtr ; boolean moveable ; boolean resizable ; Table parent ; public TableColumn ( Table parent , int style ) { } public TableColumn ( Table parent , int style , int index ) { } public void addControlListener ( ControlListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } void createHandle ( ) { } void deregister ( ) { } void destroyWidget ( ) { } int GetBackground ( int itemHandle ) { } int GetCheck ( int itemHandle ) { } int GetFont ( int itemHandle ) { } int GetForeground ( int itemHandle ) { } int GetImage ( int itemHandle ) { } int GetText ( int itemHandle ) { } public int getAlignment ( ) { } String getNameText ( ) { } public Table getParent ( ) { } public boolean getMoveable ( ) { } public boolean getResizable ( ) { } public String getToolTipText ( ) { } public int getWidth ( ) { } int findPart ( int part ) { if ( ! ( OS . FrameworkElement_IsLoaded ( headerHandle ) ) ) <START_BUG> OS . UIElement_UpdateLayout ( headerHandle ) ; <END_BUG> int contentPresenterType = OS . ContentPresenter_typeid ( ) ; int contentPresenter = findStackPanel ( headerHandle , contentPresenterType ) ; OS . GCHandle_Free ( contentPresenterType ) ; int result = OS . VisualTreeHelper_GetChild ( contentPresenter , part ) ; OS . GCHandle_Free ( contentPresenter ) ; return result ; } int findStackPanel ( int element , int contentPresenterType ) { } public void pack ( ) { } void releaseHandle ( ) { } void register ( ) { } public void removeControlListener ( ControlListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setAlignment ( int alignment ) { } public void setImage ( Image image ) { } public void setMoveable ( boolean moveable ) { } public void setResizable ( boolean resizable ) { } void setSortDirection ( int direction ) { } public void setText ( String string ) { } public void setToolTipText ( String string ) { } public void setWidth ( int width ) { } }

Fix:
updateLayout ( headerHandle ) ;
Buggy code:
public class ApplicationStringResourceLoaderTest extends StringResourceLoaderTestBase { public ApplicationStringResourceLoaderTest ( String message ) { } protected IStringResourceLoader createLoader ( ) { } public void testLoaderUnknownResources ( ) { Application app = new Application ( ) { public ISessionFactory getSessionFactory ( ) { return null ; } protected IRequestCycleProcessor getDefaultRequestCycleProcessor ( ) { return null ; } } ; IStringResourceLoader loader = new ApplicationStringResourceLoader ( app ) ; <START_BUG> Assert . assertNull ( "Unknown<seq2seq4repair_space>resource<seq2seq4repair_space>should<seq2seq4repair_space>return<seq2seq4repair_space>null" , loader . loadStringResource ( component , "test.string" , Locale . getDefault ( ) , null ) ) ; <END_BUG> } }

Fix:
Assert . assertNull ( "Unknown<seq2seq4repair_space>resource<seq2seq4repair_space>should<seq2seq4repair_space>return<seq2seq4repair_space>null" , loader . loadStringResource ( component . getClass ( ) , "test.string" , Locale . getDefault ( ) , null ) ) ;
Buggy code:
public class GroupReplacer implements KeywordReplacer { @ Override public void replace ( Release release , Map < String , Integer > weights ) { String reservedKey = "%GROUP%" ; if ( ! ( weights . containsKey ( reservedKey ) ) ) return ; int weight = weights . get ( reservedKey ) ; weights . remove ( reservedKey ) ; <START_BUG> String group = release . getReleasegroup ( ) ; <END_BUG> weights . put ( group , weight ) ; } }

Fix:
String group = release . getReleasegroup ( ) . toLowerCase ( ) ;
Buggy code:
public class Button extends Control { String text = "" ; Image image ; int cIcon ; boolean isImage ; boolean tracking ; public Button ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } void click ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultThemeFont ( ) { } void drawWidget ( int control , int context , int damageRgn , int visibleRgn , int theEvent ) { } public int getAlignment ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public boolean getSelection ( ) { } public String getText ( ) { } Rect getInset ( ) { } int kEventControlHit ( int nextHandler , int theEvent , int userData ) { } int kEventMouseDown ( int nextHandler , int theEvent , int userData ) { int result = super . kEventMouseDown ( nextHandler , theEvent , userData ) ; if ( result == ( OS . noErr ) ) return result ; display . grabControl = null ; display . runDeferredEvents ( ) ; tracking = false ; result = OS . CallNextEventHandler ( nextHandler , theEvent ) ; if ( tracking ) { org . eclipse . swt . internal . carbon . Point outPt = new org . eclipse . swt . internal . carbon . Point ( ) ; OS . GetGlobalMouse ( outPt ) ; Rect rect = new Rect ( ) ; int window = OS . GetControlOwner ( handle ) ; int x ; int y ; if ( OS . HIVIEW ) { CGPoint pt = new CGPoint ( ) ; pt . x = outPt . h ; pt . y = outPt . v ; OS . HIViewConvertPoint ( pt , 0 , handle ) ; x = ( ( int ) ( pt . x ) ) ; y = ( ( int ) ( pt . y ) ) ; OS . GetWindowBounds ( window , ( ( short ) ( kWindowStructureRgn ) ) , rect ) ; } else { OS . GetControlBounds ( handle , rect ) ; x = ( outPt . h ) - ( rect . left ) ; y = ( outPt . v ) - ( rect . top ) ; OS . GetWindowBounds ( window , ( ( short ) ( kWindowContentRgn ) ) , rect ) ; } x -= rect . left ; y -= rect . top ; short [ ] button = new short [ 1 ] ; OS . GetEventParameter ( theEvent , kEventParamMouseButton , typeMouseButton , null , 2 , null , button ) ; int chord = OS . GetCurrentEventButtonState ( ) ; int modifiers = OS . GetCurrentEventKeyModifiers ( ) ; <START_BUG> sendMouseEvent ( MouseUp , button [ 0 ] , chord , ( ( short ) ( x ) ) , ( ( short ) ( y ) ) , modifiers , true ) ; <END_BUG> } tracking = false ; return result ; } int kEventControlTrack ( int nextHandler , int theEvent , int userData ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAlignment ( int alignment ) { } void _setAlignment ( int alignment ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } void setDefault ( boolean value ) { } public void setImage ( Image image ) { } boolean setRadioSelection ( boolean value ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } int traversalCode ( int key , int theEvent ) { } }

Fix:
sendMouseEvent ( MouseUp , button [ 0 ] , true , chord , ( ( short ) ( x ) ) , ( ( short ) ( y ) ) , modifiers ) ;
Buggy code:
public class ProxyStepHandler implements NewStepHandler { private final NewProxyController proxyController ; public ProxyStepHandler ( final NewProxyController proxyController ) { } @ Override public void execute ( NewOperationContext context , ModelNode operation ) { } private static class DelegatingMessageHandler implements OperationMessageHandler { private final NewOperationContext context ; DelegatingMessageHandler ( final NewOperationContext context ) { } @ Override public void handleReport ( MessageSeverity severity , String message ) { } } private static class DelegatingOperationAttachments implements OperationAttachments { private final NewOperationContext context ; private DelegatingOperationAttachments ( final NewOperationContext context ) { } @ Override public List < InputStream > getInputStreams ( ) { int count = context . getAttachmentStreamCount ( ) ; List < InputStream > result = new ArrayList < InputStream > ( count ) ; for ( int i = 0 ; i < count ; i ++ ) { <START_BUG> result . add ( context . getAttachmentStream ( count ) ) ; <END_BUG> } return result ; } } }

Fix:
result . add ( context . getAttachmentStream ( i ) ) ;
Buggy code:
public final class TestFuzzyKmeansClustering extends MahoutTestCase { private FileSystem fs ; private final DistanceMeasure measure = new EuclideanDistanceMeasure ( ) ; @ Override @ Before public void setUp ( ) throws Exception { } private static double round ( double val , int places ) { } private static Vector tweakValue ( Vector point ) { } @ Test public void testFuzzyKMeansSeqJob ( ) throws Exception { List < VectorWritable > points = TestKmeansClustering . getPointsWritable ( REFERENCE ) ; Path pointsPath = getTestTempDirPath ( "points" ) ; Path clustersPath = getTestTempDirPath ( "clusters" ) ; Configuration conf = new Configuration ( ) ; ClusteringTestUtils . writePointsToFile ( points , new Path ( pointsPath , "file1" ) , fs , conf ) ; for ( int k = 0 ; k < ( points . size ( ) ) ; k ++ ) { System . out . println ( ( "testKFuzzyKMeansMRJob<seq2seq4repair_space>k=<seq2seq4repair_space>" + k ) ) ; SequenceFile . Writer writer = new SequenceFile . Writer ( fs , conf , new Path ( clustersPath , "part-00000" ) , Text . class , SoftCluster . class ) ; try { for ( int i = 0 ; i < ( k + 1 ) ; i ++ ) { Vector vec = TestFuzzyKmeansClustering . tweakValue ( points . get ( i ) . get ( ) ) ; SoftCluster cluster = new SoftCluster ( vec , i , measure ) ; cluster . observe ( cluster . getCenter ( ) , 1 ) ; writer . append ( new Text ( cluster . getIdentifier ( ) ) , cluster ) ; } } finally { Closeables . closeQuietly ( writer ) ; } Path output = getTestTempDirPath ( "output" ) ; String [ ] args = new String [ ] { optKey ( INPUT_OPTION ) , pointsPath . toString ( ) , optKey ( CLUSTERS_IN_OPTION ) , clustersPath . toString ( ) , optKey ( OUTPUT_OPTION ) , output . toString ( ) , optKey ( DISTANCE_MEASURE_OPTION ) , EuclideanDistanceMeasure . class . getName ( ) , optKey ( CONVERGENCE_DELTA_OPTION ) , "0.001" , optKey ( MAX_ITERATIONS_OPTION ) , "2" , optKey ( M_OPTION ) , "2.0" , optKey ( CLUSTERING_OPTION ) , optKey ( EMIT_MOST_LIKELY_OPTION ) , optKey ( OVERWRITE_OPTION ) , optKey ( METHOD_OPTION ) , DefaultOptionCreator . SEQUENTIAL_METHOD } ; <START_BUG> new FuzzyKMeansDriver ( ) . run ( args ) ; <END_BUG> long count = HadoopUtil . countRecords ( new Path ( output , "clusteredPoints//part-m-0" ) , conf ) ; assertTrue ( ( count > 0 ) ) ; } } @ Test public void testFuzzyKMeansMRJob ( ) throws Exception { } @ Test public void testClusterObservationsSerialization ( ) throws Exception { } }

Fix:
FuzzyKMeansDriver . main ( args ) ;
Buggy code:
public class TypeParameter extends ASTNode { public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( TypeParameter . class , "name" , SimpleName . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor TYPE_BOUNDS_PROPERTY = new ChildListPropertyDescriptor ( TypeParameter . class , "typeBounds" , Type . class , ASTNode . NO_CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private SimpleName typeVariableName = null ; private ASTNode . NodeList typeBounds = new ASTNode . NodeList ( TypeParameter . TYPE_BOUNDS_PROPERTY ) ; TypeParameter ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public SimpleName getName ( ) { if ( ( this . typeVariableName ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . typeVariableName ) == null ) { preLazyInit ( ) ; this . typeVariableName = new SimpleName ( this . ast ) ; postLazyInit ( this . typeVariableName , TypeParameter . NAME_PROPERTY ) ; } } } return this . typeVariableName ; } public void setName ( SimpleName typeName ) { } public List typeBounds ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class Parser { public static Response getAnswer ( String str ) { } private static boolean isMale ( String str ) { } private static boolean isFemale ( String str ) { } private static boolean isYes ( String str ) { } private static boolean isNo ( String str ) { } public static Gender getGender ( String str ) { if ( Parser . isMale ( str ) ) return Gender . MALE ; else if ( Parser . isFemale ( str ) ) return Gender . FEMALE ; <START_BUG> return null ; <END_BUG> } public static Command getCommand ( DungeonEscape game , String input ) { } }

Fix:
return Gender . OTHER ;
Buggy code:
public class StaleAsyncRequestCheckingCallable extends AbstractDelegatingCallable { private final AsyncWebRequest asyncWebRequest ; public StaleAsyncRequestCheckingCallable ( AsyncWebRequest asyncWebRequest ) { } public Object call ( ) throws Exception { <START_BUG> Object result = getNextCallable ( ) . call ( ) ; <END_BUG> if ( this . asyncWebRequest . isAsyncCompleted ( ) ) { throw new StaleAsyncWebRequestException ( "Async<seq2seq4repair_space>request<seq2seq4repair_space>no<seq2seq4repair_space>longer<seq2seq4repair_space>available<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>a<seq2seq4repair_space>timeout<seq2seq4repair_space>or<seq2seq4repair_space>a<seq2seq4repair_space>(client)<seq2seq4repair_space>error" ) ; } return result ; } }

Fix:
Object result = getNext ( ) . call ( ) ;
Buggy code:
public class MathUtil { private static final float [ ] MET_JOG = new float [ ] { 2.3F , 0.75F , 2.9F , 1.111F , 3.3F , 1.333F , 3.6F , 1.528F , 5.0F , 1.778F , 6.0F , 2.0513F , 8.0F , 2.222F , 10.0F , 2.6667F , 13.5F , 3.5508F , 16.0F , 4.4444F } ; private static final float [ ] MET_CYCLE = new float [ ] { 4.0F , 4.4444F , 10.0F , 7.1111F } ; public static double distanceBetween ( GeoPoint gp1 , GeoPoint gp2 ) { double tmplat1 = ( ( Math . PI ) // 180 ) * ( ( gp1 . getLatitudeE6 ( ) ) // 1000000.0 ) ; double tmplong1 = ( ( Math . PI ) // 180 ) * ( ( gp1 . getLongitudeE6 ( ) ) // 1000000.0 ) ; double tmplat2 = ( ( Math . PI ) // 180 ) * ( ( gp2 . getLatitudeE6 ( ) ) // 1000000.0 ) ; double tmplong2 = ( ( Math . PI ) // 180 ) * ( ( gp2 . getLongitudeE6 ( ) ) // 1000000.0 ) ; double d = ( Math . acos ( ( ( ( Math . sin ( tmplat1 ) ) * ( Math . sin ( tmplat2 ) ) ) + ( ( ( Math . cos ( tmplat1 ) ) * ( Math . cos ( tmplat2 ) ) ) * ( Math . cos ( ( tmplong2 - tmplong1 ) ) ) ) ) ) ) * 6371.0 ; <START_BUG> return d ; <END_BUG> } public static double calculateCalories ( String mode , double speed , double seconds , double weight ) { } private static double calculateCalories ( float [ ] mets , double speed , double seconds , double weight ) { } public static float getMaxSpeedForMode ( String mode ) { } }

Fix:
return ( Double . isNaN ( d ) ) || ( Double . isInfinite ( d ) ) ? 0 : d ;
Buggy code:
public class LwjglJavaFX extends Application { public static void main ( String [ ] args ) { } @ Override public void start ( Stage stage ) { stage . setTitle ( "JavaFX<seq2seq4repair_space>Window" ) ; stage . setMinWidth ( 640 ) ; stage . setMinHeight ( 480 ) ; final Screen screen = Screen . getPrimary ( ) ; final Rectangle2D screenBounds = screen . getVisualBounds ( ) ; if ( ( ( screenBounds . getWidth ( ) ) < ( stage . getWidth ( ) ) ) || ( ( screenBounds . getHeight ( ) ) < ( stage . getHeight ( ) ) ) ) { stage . setX ( screenBounds . getMinX ( ) ) ; stage . setY ( screenBounds . getMinY ( ) ) ; stage . setWidth ( screenBounds . getWidth ( ) ) ; stage . setHeight ( screenBounds . getHeight ( ) ) ; } BorderPane pane = new BorderPane ( ) ; <START_BUG> final URL fxmlURL = getClass ( ) . getClassLoader ( ) . getResource ( "mapeditor.fxml" ) ; <END_BUG> final FXMLLoader fxmlLoader = new FXMLLoader ( fxmlURL ) ; fxmlLoader . setRoot ( pane ) ; try { pane = ( ( BorderPane ) ( fxmlLoader . load ( ) ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; System . exit ( ( - 1 ) ) ; return ; } final Scene scene = new Scene ( pane ) ; stage . setScene ( scene ) ; stage . show ( ) ; ImageView glArea = ( ( ImageView ) ( pane . lookup ( "#glTarget" ) ) ) ; glArea . fitWidthProperty ( ) . bind ( ( ( AnchorPane ) ( glArea . getParent ( ) ) ) . widthProperty ( ) ) ; glArea . fitHeightProperty ( ) . bind ( ( ( AnchorPane ) ( glArea . getParent ( ) ) ) . heightProperty ( ) ) ; new com . badlogic . gdx . backends . lwjgl . LwjglFXApplication ( new TestApp ( ) , glArea ) ; } }

Fix:
final URL fxmlURL = getClass ( ) . getClassLoader ( ) . getResource ( "src//main//java-spike//mapeditor.fxml" ) ;
Buggy code:
public class Problem41 { private static final int UPPER_LIMIT = 9 ; public static void main ( String ... args ) { for ( int digits = Problem41 . UPPER_LIMIT ; digits > 0 ; digits -- ) { String salt = "" ; <START_BUG> for ( int i = Problem41 . UPPER_LIMIT ; i > 0 ; i -- ) { <END_BUG> salt += i ; } System . out . println ( ( "Generator:<seq2seq4repair_space>" + salt ) ) ; List < String > permutations = PermUtils . getPermutations ( salt ) ; System . out . println ( ( "Generated<seq2seq4repair_space>permutations<seq2seq4repair_space>count:<seq2seq4repair_space>" + ( permutations . size ( ) ) ) ) ; for ( String permutation : permutations ) { long candidate = Long . parseLong ( permutation ) ; if ( PrimeUtils . isPrime ( candidate ) ) { System . out . println ( ( "Found<seq2seq4repair_space>prime<seq2seq4repair_space>pandigital:<seq2seq4repair_space>" + candidate ) ) ; return ; } } } } }

Fix:
for ( int i = digits ; i > 0 ; i -- ) {
Buggy code:
public class SelectResultDataSource implements GridDataSource { private List < Triple > currentPage ; private final Query query ; private final QueryDataService queryDataService ; private int startIndex = 0 ; @ SuppressWarnings ( "unused" ) private int endIndex = 0 ; public SelectResultDataSource ( Query query , QueryDataService queryDataService ) { } public void prepare ( int startIndex , int endIndex , List < SortConstraint > sortConstraints ) { } public int getAvailableRows ( ) { <START_BUG> return queryDataService . executeCountForQuery ( query ) ; <END_BUG> } public Object getRowValue ( int index ) { } public Class < ? > getRowType ( ) { } }

Fix:
return queryDataService . executeCountForQuery ( query , true ) ;
Buggy code:
abstract class AbstractInvocationHandlerEJB extends AbstractInvocationHandler { private ServiceName ejbComponentViewName ; private volatile ComponentView ejbComponentView ; private volatile ManagedReference reference ; public void init ( final Endpoint endpoint ) { } private ComponentView getComponentView ( ) { } public void invoke ( final Endpoint endpoint , final Invocation wsInvocation ) throws Exception { try { onBeforeInvocation ( wsInvocation ) ; final ComponentView componentView = getComponentView ( ) ; final Method method = getEJBMethod ( wsInvocation . getJavaMethod ( ) , componentView . getViewMethods ( ) ) ; final InterceptorContext context = new InterceptorContext ( ) ; prepareForInvocation ( context , wsInvocation ) ; context . setMethod ( method ) ; context . setParameters ( wsInvocation . getArgs ( ) ) ; context . setTarget ( reference . getInstance ( ) ) ; context . putPrivateData ( Component . class , componentView . getComponent ( ) ) ; context . putPrivateData ( ComponentView . class , componentView ) ; final Object retObj = componentView . invoke ( context ) ; wsInvocation . setReturnValue ( retObj ) ; } catch ( Throwable t ) { <START_BUG> log . error ( ( "Method<seq2seq4repair_space>invocation<seq2seq4repair_space>failed<seq2seq4repair_space>with<seq2seq4repair_space>exception:<seq2seq4repair_space>" + ( t . getMessage ( ) ) ) , t ) ; <END_BUG> handleInvocationException ( t ) ; } finally { onAfterInvocation ( wsInvocation ) ; } } private Method getEJBMethod ( final Method seiMethod , final Collection < Method > viewMethods ) { } private boolean matches ( final Method seiMethod , final Method viewMethod ) { } protected void prepareForInvocation ( final InterceptorContext context , final Invocation wsInvocation ) { } }

Fix:
log . error ( WSMessages . MESSAGES . methodInvocationFailed ( t . getLocalizedMessage ( ) ) , t ) ;
Buggy code:
public abstract class Unit extends GameObjectSolid { private double relativeDirection ; private Attribute attribute ; private GameObjectState currentState ; private List < LootRecord > lootRecordList ; private Inventory inventory ; private ISkillAction skillApplyAction ; private ISkillAction stealSkillCostAction ; private ItemRecord itemToUse ; private ItemRecord itemToDrop ; private Loot itemToPick ; private Timer useItemTimer ; private Timer dropItemTimer ; private Timer pickItemTimer ; private final int USE_ITEM_TIME = 300 ; private final int DROP_ITEM_TIME = 300 ; private final int PICK_ITEM_TIME = 300 ; private final int LOOT_RANGE = 50 ; private final int LOOT_PICK_RADIUS = 30 ; private List < Skill > skillList ; private Skill castingSkill ; private Timer preApplyCastingTimer ; private Timer castingTimer ; public Unit ( double x , double y , double direction , GameObjInstanceKind type ) { } @ Override public void update ( int delta ) { } public void stand ( ) { } public void move ( ) { } public void move ( double relativeDirection ) { } public void rotate ( double directionDelta ) { } public void startUseItem ( ) { } private void useItem ( ) { } public void startDropItem ( ) { } private void dropItem ( ) { Loot loot = new Loot ( ( ( getX ( ) ) + ( MathAdv . lengthDirX ( getDirection ( ) , LOOT_RANGE ) ) ) , ( ( getY ( ) ) + ( MathAdv . lengthDirY ( getDirection ( ) , LOOT_RANGE ) ) ) , itemToDrop . getItem ( ) ) ; <START_BUG> World . getInstance ( ) . getGameObjectList ( ) . add ( loot ) ; <END_BUG> inventory . deleteItem ( inventory . getSelectedRecord ( ) . getItem ( ) . getInstanceKind ( ) ) ; currentState = GameObjectState . STAND ; } private void updateItemToPick ( ) { } public void startPickItem ( ) { } private void pickItem ( ) { } public void startCastSkill ( SkillInstanceKind skillInstanceKind ) { } private Skill getSkillByKind ( SkillInstanceKind skillInstanceKind ) { } private void onCastingFinish ( ) { } private void updatePosition ( int delta ) { } private void updateSkills ( int delta ) { } protected void onDelete ( ) { } public boolean canStartCast ( Skill skillToCast ) { } @ Override public void setDirection ( double direction ) { } public Attribute getAttribute ( ) { } public double getRelativeDirection ( ) { } public GameObjectState getCurrentState ( ) { } public Inventory getInventory ( ) { } public List < Skill > getSkillList ( ) { } public Skill getCastingSkill ( ) { } public Loot getItemToPick ( ) { } public int getCurrentSkillCastingTime ( ) { } No newline ; at end ; of file ; }

Fix:
World . getInstance ( ) . getGameObjectToAddList ( ) . add ( loot ) ;
Buggy code:
public class CurGame { public static Maze maze ; public static int curLayer = 0 ; public static Character character = new Character ( ) ; static double gameTime = 0 ; public static ArrayList < Entity > entities = new ArrayList < Entity > ( ) ; public static void tickEnts ( double delta ) { } public static void tickEvents ( ) { for ( int i = 0 ; i < ( CurGame . maze . events . size ( ) ) ; i ++ ) { if ( ( ( CurGame . maze . events . get ( i ) . time ) < ( ( CurGame . gameTime ) + 3 ) ) && ( ! ( CurGame . maze . events . get ( i ) . happened ) ) ) { <START_BUG> CurGame . entities . add ( new FallingObject ( CurGame . maze . events . get ( i ) . x , CurGame . maze . events . get ( i ) . y , 3 , CurGame . maze . events . get ( i ) . object ) ) ; <END_BUG> CurGame . maze . events . get ( i ) . happened = true ; } if ( ( CurGame . maze . events . get ( i ) . time ) < ( CurGame . gameTime ) ) { CurGame . curLayer = CurGame . maze . events . get ( i ) . newLayer ; float x0 = ( CurGame . maze . events . get ( i ) . x ) - 96 ; float y0 = ( CurGame . maze . events . get ( i ) . y ) - 96 ; float d = 96 // 5 ; app . log ( "Event" , ( ( ( ( ( "Pregenerated<seq2seq4repair_space>event<seq2seq4repair_space>at<seq2seq4repair_space>" + ( CurGame . maze . events . get ( i ) . time ) ) + "<seq2seq4repair_space>(+" ) + ( ( Math . floor ( ( 100 * ( ( CurGame . gameTime ) - ( CurGame . maze . events . get ( i ) . time ) ) ) ) ) // 100 ) ) + "s)<seq2seq4repair_space>newLayer:" ) + ( CurGame . curLayer ) ) ) ; for ( int x = 0 ; x < 10 ; x ++ ) for ( int y = 0 ; y < 10 ; y ++ ) { CurGame . entities . add ( new Particle ( ( x0 + ( d * x ) ) , ( y0 + ( d * y ) ) , ( ( ( ( float ) ( Math . random ( ) ) ) * 40 ) - 20 ) , ( ( float ) ( ( ( Math . random ( ) ) * 40 ) - 20 ) ) , 20 , 5 , Color . GRAY ) ) ; } CurGame . maze . events . remove ( i ) ; break ; } } } }

Fix:
CurGame . entities . add ( new FallingObject ( ( ( CurGame . maze . events . get ( i ) . x ) - 64 ) , ( ( CurGame . maze . events . get ( i ) . y ) - 64 ) , 3 , CurGame . maze . events . get ( i ) . object ) ) ;
Buggy code:
public class OpenWithAttachmentCommand extends SaveAttachmentCommand { private File tempFile ; private MimeHeader header ; public OpenWithAttachmentCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { MimeTypeViewer viewer = new MimeTypeViewer ( ) ; <START_BUG> viewer . openWith ( header , tempFile ) ; <END_BUG> } protected File getDestinationFile ( MimeHeader header ) { } }

Fix:
viewer . openWith ( header , tempFile , false ) ;
Buggy code:
public class MathArraysTest { @ Test public void testScale ( ) { } @ Test public void testScaleInPlace ( ) { } @ Test ( expected = DimensionMismatchException . class ) public void testEbeAddPrecondition ( ) { } @ Test ( expected = DimensionMismatchException . class ) public void testEbeSubtractPrecondition ( ) { } @ Test ( expected = DimensionMismatchException . class ) public void testEbeMultiplyPrecondition ( ) { } @ Test ( expected = DimensionMismatchException . class ) public void testEbeDividePrecondition ( ) { } @ Test public void testEbeAdd ( ) { } @ Test public void testEbeSubtract ( ) { } @ Test public void testEbeMultiply ( ) { } @ Test public void testEbeDivide ( ) { } @ Test public void testL1DistanceDouble ( ) { } @ Test public void testL1DistanceInt ( ) { } @ Test public void testL2DistanceDouble ( ) { } @ Test public void testL2DistanceInt ( ) { } @ Test public void testLInfDistanceDouble ( ) { } @ Test public void testLInfDistanceInt ( ) { } @ Test public void testCheckOrder ( ) { } @ Test public void testIsMonotonic ( ) { } @ Test public void testIsMonotonicComparable ( ) { } @ Test public void testCheckRectangular ( ) { } @ Test public void testCheckPositive ( ) { } @ Test public void testCheckNonNegative ( ) { } @ Test public void testCheckNonNegative2D ( ) { } @ Test public void testSortInPlace ( ) { } @ Test public void testSortInPlaceDecresasingOrder ( ) { } @ Test public void testSortInPlaceExample ( ) { } @ Test public void testSortInPlaceFailures ( ) { } @ Test public void testCopyOfInt ( ) { } @ Test public void testCopyOfInt2 ( ) { } @ Test public void testCopyOfInt3 ( ) { } @ Test public void testCopyOfDouble ( ) { } @ Test public void testCopyOfDouble2 ( ) { } @ Test public void testCopyOfDouble3 ( ) { } @ Test public void testLinearCombinationWithSingleElementArray ( ) { } @ Test public void testLinearCombination1 ( ) { } @ Test public void testLinearCombination2 ( ) { } @ Test public void testLinearCombinationInfinite ( ) { } @ Test public void testArrayEquals ( ) { } @ Test public void testArrayEqualsIncludingNaN ( ) { } @ Test public void testNormalizeArray ( ) { } @ Test public void testConvolve ( ) { } @ Test public void testShuffleTail ( ) { } @ Test public void testShuffleHead ( ) { } @ Test public void testNatural ( ) { } @ Test public void testNaturalZero ( ) { final int [ ] natural = MathArrays . natural ( 0 ) ; <START_BUG> Assert . assertEquals ( natural . length , 0 ) ; <END_BUG> } }

Fix:
Assert . assertEquals ( 0 , natural . length ) ;
Buggy code:
public class IndexedParamTest extends WicketTestCase { public IndexedParamTest ( String name ) { } public void testPage ( ) throws Exception { application . setHomePage ( Page1 . class ) ; <START_BUG> application . mount ( "//page2" , new IndexedParamUrlCodingStrategy ( "//page2" , Page2 . class ) ) ; <END_BUG> executeTest ( Page1 . class , "IndexedParamTest_ExpectedResult-1.html" ) ; application . setupRequestAndResponse ( ) ; WebRequestCycle cycle = application . createRequestCycle ( ) ; ( ( wicket . protocol . http . MockHttpServletRequest ) ( application . getWicketRequest ( ) . getHttpServletRequest ( ) ) ) . setURL ( "//WicketTester//WicketTester//page2//abc" ) ; application . processRequestCycle ( cycle ) ; assertEquals ( Page2 . class , application . getLastRenderedPage ( ) . getClass ( ) ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( DiffUtil . validatePage ( document , this . getClass ( ) , "IndexedParamTest_ExpectedResult-2.html" ) ) ; } }

Fix:
application . mount ( new IndexedParamUrlCodingStrategy ( "//page2" , Page2 . class ) ) ;
Buggy code:
public class InstructorFeedbackResultsGroupByQuestionPanel extends InstructorResultsParticipantPanel { List < InstructorResultsQuestionTable > questionTables ; boolean isEmailValid ; public InstructorFeedbackResultsGroupByQuestionPanel ( ) { } public static InstructorFeedbackResultsGroupByQuestionPanel buildInstructorFeedbackResultsGroupByQuestionPanel ( FeedbackSessionResultsBundle bundle , List < InstructorResultsQuestionTable > questionTables , boolean isEmailValid , Url profilePictureLink , String mailtoStyle , boolean isGiver , String participantIdentifier , String participantName , InstructorResultsModerationButton moderationButton , boolean isModerationButtonDisplayed ) { InstructorFeedbackResultsGroupByQuestionPanel byQuestionPanel = new InstructorFeedbackResultsGroupByQuestionPanel ( ) ; byQuestionPanel . setParticipantIdentifier ( participantIdentifier ) ; byQuestionPanel . setName ( participantName ) ; byQuestionPanel . setGiver ( isGiver ) ; byQuestionPanel . setEmailValid ( isEmailValid ) ; <START_BUG> byQuestionPanel . profilePictureLink = profilePictureLink ; <END_BUG> byQuestionPanel . mailtoStyle = mailtoStyle ; byQuestionPanel . questionTables = questionTables ; byQuestionPanel . setModerationButton ( moderationButton ) ; byQuestionPanel . setModerationButtonDisplayed ( isModerationButtonDisplayed ) ; return byQuestionPanel ; } public List < InstructorResultsQuestionTable > getQuestionTables ( ) { } public void setQuestionTables ( List < InstructorResultsQuestionTable > questionTables ) { } public boolean isEmailValid ( ) { } public void setEmailValid ( boolean isEmailValid ) { } }

Fix:
byQuestionPanel . profilePictureLink = profilePictureLink . toString ( ) ;
Buggy code:
public class LaunchVMProcessTask extends BaseTask < IMachine , IMachine > { public LaunchVMProcessTask ( Context activity , VBoxSvc vmgr ) { } @ Override protected IMachine work ( IMachine ... m ) throws Exception { if ( ! ( m [ 0 ] . getSessionState ( ) . equals ( UNLOCKED ) ) ) throw new RuntimeException ( ( "Machine<seq2seq4repair_space>session<seq2seq4repair_space>state<seq2seq4repair_space>is<seq2seq4repair_space>" + ( m [ 0 ] . getSessionState ( ) ) ) ) ; handleProgress ( m [ 0 ] . launchVMProcess ( _vmgr . getVBox ( ) . getSessionObject ( ) , headless ) ) ; <START_BUG> _vmgr . getVBox ( ) . getPerformanceCollector ( ) . setupMetrics ( new String [ ] { "*:" } , PreferenceManager . getDefaultSharedPreferences ( context ) . getInt ( PERIOD , 0 ) , 1 , m [ 0 ] ) ; <END_BUG> return m [ 0 ] ; } No newline ; at end ; of file ; }

Fix:
_vmgr . getVBox ( ) . getPerformanceCollector ( ) . setupMetrics ( new String [ ] { "*:" } , Integer . valueOf ( PreferenceManager . getDefaultSharedPreferences ( context ) . getString ( PERIOD , "" ) ) , 1 , m [ 0 ] ) ;