nus-yam/ex-repair huggingface dataset:
Buggy code:
public class NamesFilter implements IFilter { private List < String > names_ ; NamesFilter ( List < String > names ) { } public ColumnFamily filter ( String cf , ColumnFamily columnFamily ) { if ( columnFamily == null ) { return columnFamily ; } String [ ] values = RowMutation . getColumnAndColumnFamily ( cf ) ; ColumnFamily filteredCf = new ColumnFamily ( columnFamily . name ( ) , columnFamily . type ( ) ) ; if ( ( values . length ) == 1 ) { Collection < IColumn > columns = columnFamily . getAllColumns ( ) ; for ( IColumn column : columns ) { if ( names_ . contains ( column . name ( ) ) ) { names_ . remove ( column . name ( ) ) ; filteredCf . addColumn ( column ) ; } if ( isDone ( ) ) { return filteredCf ; } } } else if ( ( ( values . length ) == 2 ) && ( columnFamily . isSuper ( ) ) ) { Collection < IColumn > columns = columnFamily . getAllColumns ( ) ; for ( IColumn column : columns ) { SuperColumn superColumn = ( ( SuperColumn ) ( column ) ) ; SuperColumn filteredSuperColumn = new SuperColumn ( superColumn . name ( ) ) ; filteredCf . addColumn ( filteredSuperColumn ) ; Collection < IColumn > subColumns = superColumn . getSubColumns ( ) ; for ( IColumn subColumn : subColumns ) { if ( names_ . contains ( subColumn . name ( ) ) ) { names_ . remove ( subColumn . name ( ) ) ; <START_BUG> filteredSuperColumn . addColumn ( subColumn . name ( ) , subColumn ) ; <END_BUG> } if ( isDone ( ) ) { return filteredCf ; } } } } else { throw new UnsupportedOperationException ( ) ; } return filteredCf ; } public IColumn filter ( IColumn column , DataInputStream dis ) throws IOException { } public boolean isDone ( ) { } public DataInputBuffer next ( String key , String cf , SSTable ssTable ) throws IOException { } }

Fix:
filteredSuperColumn . addColumn ( subColumn ) ;
Buggy code:
public class SlaveContextService implements IContextService { protected IContextService fParentService ; protected Expression fDefaultExpression ; protected Set fParentActivations ; protected Map fLocalActivations ; public SlaveContextService ( IContextService parentService , Expression defaultExpression ) { } public IContextActivation activateContext ( String contextId ) { } public IContextActivation activateContext ( String contextId , Expression expression ) { } public IContextActivation activateContext ( String contextId , Expression expression , boolean global ) { if ( global ) { <START_BUG> IContextActivation activation = fParentService . activateContext ( contextId , expression ) ; <END_BUG> fParentActivations . add ( activation ) ; return activation ; } AndExpression andExpression = null ; if ( expression instanceof AndExpression ) { andExpression = ( ( AndExpression ) ( expression ) ) ; } else { andExpression = new AndExpression ( ) ; andExpression . add ( expression ) ; } andExpression . add ( fDefaultExpression ) ; ContextActivation activation = new ContextActivation ( contextId , andExpression , this ) ; return doActivateContext ( activation ) ; } public IContextActivation activateContext ( String contextId , Expression expression , int sourcePriorities ) { } public void addContextManagerListener ( IContextManagerListener listener ) { } public void addSourceProvider ( ISourceProvider provider ) { } public void deactivateContext ( IContextActivation activation ) { } public void deactivateContexts ( Collection activations ) { } public void dispose ( ) { } protected IContextActivation doActivateContext ( IContextActivation activation ) { } public Collection getActiveContextIds ( ) { } public Context getContext ( String contextId ) { } public Collection getDefinedContextIds ( ) { } public Context [ ] getDefinedContexts ( ) { } public int getShellType ( Shell shell ) { } public void readRegistry ( ) { } public boolean registerShell ( Shell shell , int type ) { } public void removeContextManagerListener ( IContextManagerListener listener ) { } public void removeSourceProvider ( ISourceProvider provider ) { } public boolean unregisterShell ( Shell shell ) { } }

Fix:
IContextActivation activation = fParentService . activateContext ( contextId , expression , global ) ;
Buggy code:
public class EJBViewDescription extends ViewDescription { private final MethodIntf methodIntf ; private final boolean hasJNDIBindings ; private boolean ejb2xView = false ; public EJBViewDescription ( final ComponentDescription componentDescription , final String viewClassName , final MethodIntf methodIntf ) { } public MethodIntf getMethodIntf ( ) { } @ Override public ViewConfiguration createViewConfiguration ( final Class < ? > viewClass , final ComponentConfiguration componentConfiguration , final ProxyFactory < ? > proxyFactory ) { } @ Override public boolean equals ( Object o ) { } @ Override protected InjectionSource createInjectionSource ( final ServiceName serviceName ) { if ( ( methodIntf ) != ( MethodIntf . REMOTE ) ) { return super . createInjectionSource ( serviceName ) ; } else { final EJBComponentDescription componentDescription = getComponentDescription ( ) ; <START_BUG> EEModuleDescription desc = componentDescription . getModuleDescription ( ) ; <END_BUG> return new org . jboss . as . ejb3 . remote . RemoteViewInjectionSource ( serviceName , desc . getApplicationName ( ) , desc . getModuleName ( ) , desc . getDistinctName ( ) , componentDescription . getComponentName ( ) , getViewClassName ( ) , componentDescription . isStateful ( ) ) ; } } @ Override public EJBComponentDescription getComponentDescription ( ) { } @ Override public ServiceName getServiceName ( ) { } @ Override public int hashCode ( ) { } public boolean hasJNDIBindings ( ) { } private boolean initHasJNDIBindings ( final MethodIntf methodIntf ) { } public boolean isEjb2xView ( ) { } public void setEjb2xView ( final boolean ejb2xView ) { } }

Fix:
final EEModuleDescription desc = componentDescription . getModuleDescription ( ) ;
Buggy code:
public class PerspectiveProvider extends AbstractProvider { private AbstractElement [ ] cachedElements ; private Map idToElement = new HashMap ( ) ; public String getId ( ) { } public AbstractElement getElementForId ( String id ) { } public AbstractElement [ ] getElements ( ) { if ( ( cachedElements ) == null ) { IPerspectiveDescriptor [ ] perspectives = PlatformUI . getWorkbench ( ) . getPerspectiveRegistry ( ) . getPerspectives ( ) ; cachedElements = new AbstractElement [ perspectives . length ] ; for ( int i = 0 ; i < ( perspectives . length ) ; i ++ ) { <START_BUG> PerspectiveElement perspectiveElement = new PerspectiveElement ( perspectives [ i ] ) ; <END_BUG> cachedElements [ i ] = perspectiveElement ; idToElement . put ( perspectiveElement . getId ( ) , perspectiveElement ) ; } } return cachedElements ; } public ImageDescriptor getImageDescriptor ( ) { } public String getName ( ) { } }

Fix:
PerspectiveElement perspectiveElement = new PerspectiveElement ( perspectives [ i ] , this ) ;
Buggy code:
public final class LevensteinDistance implements StringDistance { public LevensteinDistance ( ) { } public float getDistance ( String target , String other ) { char [ ] sa ; int n ; int [ ] p ; int [ ] d ; int [ ] _d ; sa = target . toCharArray ( ) ; n = sa . length ; p = new int [ n + 1 ] ; d = new int [ n + 1 ] ; final int m = other . length ( ) ; if ( n == 0 ) { return 1 ; } else if ( m == 0 ) { return 1 ; } int i ; int j ; char t_j ; int cost ; for ( i = 0 ; i <= n ; i ++ ) { p [ i ] = i ; } for ( j = 1 ; j <= m ; j ++ ) { t_j = other . charAt ( ( j - 1 ) ) ; d [ 0 ] = j ; for ( i = 1 ; i <= n ; i ++ ) { cost = ( ( sa [ ( i - 1 ) ] ) == t_j ) ? 0 : 1 ; d [ i ] = Math . min ( Math . min ( ( ( d [ ( i - 1 ) ] ) + 1 ) , ( ( p [ i ] ) + 1 ) ) , ( ( p [ ( i - 1 ) ] ) + cost ) ) ; } _d = p ; p = d ; d = _d ; } <START_BUG> return 1.0F - ( ( ( float ) ( p [ n ] ) ) // ( Math . min ( other . length ( ) , sa . length ) ) ) ; <END_BUG> } }

Fix:
return 1.0F - ( ( ( float ) ( p [ n ] ) ) // ( Math . max ( other . length ( ) , sa . length ) ) ) ;
Buggy code:
public class ConfiguratorTest { @ Test public void testConfigurator ( ) { buildWD ( ) ; Configurator c = Configurator . getInstance ( ) ; c . load ( ) ; c . load ( ) ; Object n = c . get ( null ) ; Assert . assertNull ( "Expecting<seq2seq4repair_space>to<seq2seq4repair_space>retrieve<seq2seq4repair_space>null<seq2seq4repair_space>object<seq2seq4repair_space>from<seq2seq4repair_space>null<seq2seq4repair_space>key." , n ) ; Object e = c . get ( "" ) ; Assert . assertNull ( "Expecting<seq2seq4repair_space>to<seq2seq4repair_space>retrieve<seq2seq4repair_space>null<seq2seq4repair_space>object<seq2seq4repair_space>from<seq2seq4repair_space>empty<seq2seq4repair_space>key." , e ) ; String b = ( ( String ) ( c . get ( "base" ) ) ) ; <START_BUG> Assert . assertEquals ( "Expecting<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>base<seq2seq4repair_space>path." , BASE , b ) ; <END_BUG> boolean pNK = c . put ( null , 1 ) ; boolean pEK = c . put ( "" , 1 ) ; boolean ok = c . put ( "testing" , 42 ) ; Assert . assertFalse ( "Expecting<seq2seq4repair_space>false<seq2seq4repair_space>from<seq2seq4repair_space>put()<seq2seq4repair_space>with<seq2seq4repair_space>null<seq2seq4repair_space>key." , pNK ) ; Assert . assertFalse ( "Expecting<seq2seq4repair_space>false<seq2seq4repair_space>from<seq2seq4repair_space>put()<seq2seq4repair_space>with<seq2seq4repair_space>empty<seq2seq4repair_space>key." , pEK ) ; Assert . assertFalse ( ( "Expecting<seq2seq4repair_space>false<seq2seq4repair_space>from<seq2seq4repair_space>put()<seq2seq4repair_space>with<seq2seq4repair_space>valid<seq2seq4repair_space>key<seq2seq4repair_space>" + "because<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exists<seq2seq4repair_space>before." ) , ok ) ; Integer i = ( ( Integer ) ( c . get ( "testing" ) ) ) ; Assert . assertEquals ( "Expecting<seq2seq4repair_space>to<seq2seq4repair_space>retrieve<seq2seq4repair_space>the<seq2seq4repair_space>latest<seq2seq4repair_space>properties" , new Integer ( 42 ) , i ) ; cleanWD ( ) ; } public void buildWD ( ) { } public void cleanWD ( ) { } }

Fix:
Assert . assertEquals ( "Expecting<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>base<seq2seq4repair_space>path." , cfg . get ( "base" ) , b ) ;
Buggy code:
public class ClusteringTrial { private static final String HOST_FILE = "mix-kebab1.txt" ; public static void main ( String [ ] args ) throws Exception { } public static void generateTestSet ( Queries queries ) throws Exception { final int MAX_NUM_QUERIES = 30 ; int NUM_HOSTS = 8 ; Map < Integer , ArrayList < String > > hostMap = new HashMap < Integer , ArrayList < String > > ( ) ; for ( int i = 0 ; i < NUM_HOSTS ; i ++ ) { hostMap . put ( i , new ArrayList < String > ( ) ) ; } Random rand = new Random ( ) ; rand . setSeed ( System . nanoTime ( ) ) ; for ( String str : queries . getAll ( ) ) { int randInt = rand . nextInt ( NUM_HOSTS ) ; hostMap . get ( randInt ) . add ( str ) ; } List < Host > hosts = new ArrayList < > ( ) ; final String base = "192.168.1." ; for ( int i = 0 ; i < NUM_HOSTS ; i ++ ) { List < String > querylist = hostMap . get ( i ) ; <START_BUG> String hostName = base + "i" ; <END_BUG> Host host = new Host ( hostName , querylist ) ; hosts . add ( host ) ; } IO . saveHosts ( hosts , ClusteringTrial . HOST_FILE ) ; System . out . println ( ( "Finished<seq2seq4repair_space>generating<seq2seq4repair_space>test<seq2seq4repair_space>hosts.<seq2seq4repair_space>Saved<seq2seq4repair_space>to<seq2seq4repair_space>" + ( ClusteringTrial . HOST_FILE ) ) ) ; } }

Fix:
String hostName = base + i ;
Buggy code:
public class profilGestion { public static boolean existe = false ; public static Joueur playerOne = new Joueur ( ) ; public static String name = "" ; public static int language = 1 ; public static void gestion ( ) { } public static boolean existe ( ) { } public static void ajoutePtsPendu ( int score ) { } public static void ajoutePtsPlusMoins ( int score ) { } public static void ajoutePtsMasterMind ( int score ) { } public static void afficheProfil ( ) { } public static void saveProfil ( ) { } public static void chargeProfil ( ) { if ( profilGestion . fichierExiste ( ) ) { String str = "" ; Fichier fi = new Fichier ( ) ; <START_BUG> fi . ouvrir ( ( ( profilGestion . name ) + ".sav" ) , "L" ) ; <END_BUG> str = fi . lire ( ) ; profilGestion . playerOne . setName ( str ) ; fi . lire ( ) ; int [ ] scorePendu = new int [ 10 ] ; int [ ] scorePlusMoins = new int [ 10 ] ; int [ ] scoreMasterMind = new int [ 10 ] ; for ( int i = 0 ; ! ( str . equals ( ".B" ) ) ; i ++ ) { str = fi . lire ( ) ; if ( ! ( str . equals ( ".B" ) ) ) { scorePendu [ i ] = Integer . parseInt ( str ) ; } } profilGestion . playerOne . setScorePendu ( scorePendu ) ; for ( int i = 0 ; ! ( str . equals ( ".C" ) ) ; i ++ ) { str = fi . lire ( ) ; if ( ! ( str . equals ( ".C" ) ) ) { scorePlusMoins [ i ] = Integer . parseInt ( str ) ; } } profilGestion . playerOne . setScorePlusMoins ( scorePlusMoins ) ; for ( int i = 0 ; ! ( str . equals ( ".end" ) ) ; i ++ ) { str = fi . lire ( ) ; if ( ! ( str . equals ( ".end" ) ) ) { scoreMasterMind [ i ] = Integer . parseInt ( str ) ; } } profilGestion . playerOne . setScoreMasterMind ( scoreMasterMind ) ; fi . fermer ( ) ; } } public static boolean fichierExiste ( ) { } }

Fix:
fi . ouvrir ( ( ( profilGestion . name ) + ".sav" ) , "L" , true ) ;
Buggy code:
public abstract class SAXParserFactory { private boolean validating = false ; private boolean namespaceAware = false ; protected SAXParserFactory ( ) { } public static SAXParserFactory newInstance ( ) throws FactoryConfigurationError { try { <START_BUG> return ( ( SAXParserFactory ) ( FactoryFinder . find ( "javax.xml.parsers.SAXParserFactory" , null ) ) ) ; <END_BUG> } catch ( FactoryFinder . ConfigurationError e ) { throw new FactoryConfigurationError ( e . getException ( ) , e . getMessage ( ) ) ; } } public abstract SAXParser newSAXParser ( ) throws ParserConfigurationException , SAXException { } public void setNamespaceAware ( boolean awareness ) { } public void setValidating ( boolean validating ) { } public boolean isNamespaceAware ( ) { } public boolean isValidating ( ) { } public abstract void setFeature ( String name , boolean value ) throws ParserConfigurationException , SAXNotRecognizedException , SAXNotSupportedException { } public abstract boolean getFeature ( String name ) throws ParserConfigurationException , SAXNotRecognizedException , SAXNotSupportedException { } }

Fix:
return ( ( SAXParserFactory ) ( FactoryFinder . find ( "javax.xml.parsers.SAXParserFactory" , "org.apache.xerces.jaxp.SAXParserFactoryImpl" ) ) ) ;
Buggy code:
public class OneVSOne implements Classifier { protected Classifier baseClassifier ; protected Classifier [ ] [ ] oneVone ; private boolean concurrentTrain ; protected CategoricalData predicting ; public OneVSOne ( Classifier baseClassifier ) { } public OneVSOne ( Classifier baseClassifier , boolean concurrentTrain ) { } public void setConcurrentTraining ( boolean concurrentTrain ) { } public boolean isConcurrentTraining ( ) { } @ Override public CategoricalResults classify ( DataPoint data ) { } @ Override public void trainC ( final ClassificationDataSet dataSet , final ExecutorService threadPool ) { } @ Override public void trainC ( ClassificationDataSet dataSet ) { } @ Override public boolean supportsWeightedData ( ) { } @ Override <START_BUG> public Classifier clone ( ) { <END_BUG> OneVSOne clone = new OneVSOne ( baseClassifier . clone ( ) , concurrentTrain ) ; if ( ( oneVone ) != null ) { clone . oneVone = new Classifier [ oneVone . length ] [ ] ; for ( int i = 0 ; i < ( oneVone . length ) ; i ++ ) { clone . oneVone [ i ] = new Classifier [ oneVone [ i ] . length ] ; for ( int j = 0 ; j < ( oneVone [ i ] . length ) ; j ++ ) clone . oneVone [ i ] [ j ] = oneVone [ i ] [ j ] . clone ( ) ; } } if ( ( predicting ) != null ) clone . predicting = predicting . clone ( ) ; return clone ; } }

Fix:
public OneVSOne clone ( ) {
Buggy code:
public class Client extends Thread { private Socket socket ; public String ip ; private int port ; public String name ; private BufferedWriter out ; public void run ( ) { <START_BUG> connect ( "localhost" , 9901 , "Raijen" ) ; <END_BUG> } public Client ( String IP , int port , String name ) { } public void connect ( String p_IP , int p_Port , String Name ) { } public void sendMessage ( String message ) { } public void sendName ( String newName ) { } public void sendPoint ( int x , int y ) { } public void sendDrawColor ( int rgb ) { } public void sendDrawWidth ( int x ) { } }

Fix:
connect ( ip , port , name ) ;
Buggy code:
public class RefactoringMethodVisitor extends VoidVisitorAdapter { private StepValue oldStepValue ; private StepValue newStepValue ; private List < Messages . ParameterPosition > paramPositions ; private boolean refactored ; private JavaRefactoringElement javaElement ; public RefactoringMethodVisitor ( StepValue oldStepValue , StepValue newStepValue , List < Messages . ParameterPosition > paramPositions ) { } public void visit ( MethodDeclaration methodDeclaration , Object arg ) { } private void refactor ( MethodDeclaration methodDeclaration , StringLiteralExpr memberValue , SingleMemberAnnotationExpr annotation ) { <START_BUG> if ( memberValue . getValue ( ) . equals ( oldStepValue . getStepAnnotationText ( ) ) ) { <END_BUG> List < Parameter > newParameters = Arrays . asList ( new Parameter [ paramPositions . size ( ) ] ) ; memberValue . setValue ( newStepValue . getStepAnnotationText ( ) ) ; List < Parameter > parameters = methodDeclaration . getParameters ( ) ; for ( int i = 0 , paramPositionsSize = paramPositions . size ( ) ; i < paramPositionsSize ; i ++ ) { if ( ( paramPositions . get ( i ) . getOldPosition ( ) ) < 0 ) newParameters . set ( paramPositions . get ( i ) . getNewPosition ( ) , new Parameter ( new ClassOrInterfaceType ( "String" ) , new org . walkmod . javalang . ast . body . VariableDeclaratorId ( Util . convertToCamelCase ( newStepValue . getParameters ( ) . get ( i ) ) ) ) ) ; else newParameters . set ( paramPositions . get ( i ) . getNewPosition ( ) , parameters . get ( paramPositions . get ( i ) . getOldPosition ( ) ) ) ; } methodDeclaration . setParameters ( newParameters ) ; annotation . setMemberValue ( memberValue ) ; this . javaElement = new JavaRefactoringElement ( methodDeclaration . getBeginLine ( ) , methodDeclaration . getEndLine ( ) , ( ( methodDeclaration . getBeginColumn ( ) ) - 1 ) , methodDeclaration . toString ( ) , null ) ; this . refactored = true ; } } public boolean refactored ( ) { } public JavaRefactoringElement getRefactoredJavaElement ( ) { } }

Fix:
if ( memberValue . getValue ( ) . trim ( ) . equals ( oldStepValue . getStepAnnotationText ( ) . trim ( ) ) ) {
Buggy code:
public class RestartWithMountedPageTest extends WicketTestCase { public void testWithMountedLoginPage ( ) { <START_BUG> tester . getApplication ( ) . mountBookmarkablePage ( "//login" , LoginPage . class ) ; <END_BUG> tester . startPage ( ProtectedPage . class ) ; tester . assertRenderedPage ( LoginPage . class ) ; } }

Fix:
tester . getApplication ( ) . mountPage ( "//login" , LoginPage . class ) ;
Buggy code:
public class AboutDialog extends EnhancedDialog { public AboutDialog ( View view ) { } public void ok ( ) { } public void cancel ( ) { } private JButton close ; class ActionHandler implements ActionListener { public void actionPerformed ( ActionEvent evt ) { } } static class AboutPanel extends JComponent { ImageIcon image ; Vector text ; int scrollPosition ; AboutDialog . AboutPanel . AnimationThread thread ; int maxWidth ; FontMetrics fm ; public static int TOP = 120 ; public static int BOTTOM = 30 ; AboutPanel ( ) { } public void paintComponent ( Graphics g ) { g . setColor ( new Color ( 96 , 96 , 96 ) ) ; image . paintIcon ( this , g , 1 , 1 ) ; FontMetrics fm = g . getFontMetrics ( ) ; <START_BUG> String [ ] args = new String [ ] { jEdit . getVersion ( ) } ; <END_BUG> String version = jEdit . getProperty ( "about.version" , args ) ; g . drawString ( version , ( ( ( getWidth ( ) ) - ( fm . stringWidth ( version ) ) ) // 2 ) , ( ( getHeight ( ) ) - 5 ) ) ; g = g . create ( ( ( ( getWidth ( ) ) - ( maxWidth ) ) // 2 ) , AboutDialog . AboutPanel . TOP , maxWidth , ( ( ( getHeight ( ) ) - ( AboutDialog . AboutPanel . TOP ) ) - ( AboutDialog . AboutPanel . BOTTOM ) ) ) ; int height = fm . getHeight ( ) ; int firstLine = ( scrollPosition ) // height ; int firstLineOffset = height - ( ( scrollPosition ) % height ) ; int lines = ( ( ( getHeight ( ) ) - ( AboutDialog . AboutPanel . TOP ) ) - ( AboutDialog . AboutPanel . BOTTOM ) ) // height ; int y = firstLineOffset ; for ( int i = 0 ; i <= lines ; i ++ ) { if ( ( ( i + firstLine ) >= 0 ) && ( ( i + firstLine ) < ( text . size ( ) ) ) ) { String line = ( ( String ) ( text . get ( ( i + firstLine ) ) ) ) ; g . drawString ( line , ( ( ( maxWidth ) - ( fm . stringWidth ( line ) ) ) // 2 ) , y ) ; } y += fm . getHeight ( ) ; } } public Dimension getPreferredSize ( ) { } public void addNotify ( ) { } public void removeNotify ( ) { } class AnimationThread extends Thread { private boolean running = true ; private long last ; AnimationThread ( ) { } public void kill ( ) { } public void run ( ) { } } } }

Fix:
String [ ] args = new String [ ] { jEdit . getVersion ( ) , System . getProperty ( "java.version" ) } ;
Buggy code:
public class LocationDetection extends Fragment implements GoogleApiClient . ConnectionCallbacks , GoogleApiClient . OnConnectionFailedListener , LocationListener , OnMapReadyCallback { protected static final String TAG = "basic-location" ; private static final String ARG_SECTION_NUMBER = "section_number" ; protected TextView mLatitudeText ; protected TextView mLongitudeText ; protected TextView deliverableRange ; private View rootView ; private GoogleMap googleMap ; private GoogleApiClient client ; private Location mCurrentLocation ; private Polygon polygon ; private Polygon polygonRed1 ; private Polygon polygonRed2 ; private Polygon polygonRed3 ; private Polygon polygonRed4 ; private EditText mEdit ; public static LocationDetection newInstance ( int sectionNumber ) { } public void getLocationFromAddress ( String strAddress ) { Geocoder coder = new Geocoder ( getActivity ( ) ) ; List < Address > address ; try { address = coder . getFromLocationName ( strAddress , 5 ) ; Address location = address . get ( 0 ) ; LatLng point = new LatLng ( location . getLatitude ( ) , location . getLongitude ( ) ) ; CameraPosition cameraPosition = new CameraPosition . Builder ( ) . target ( point ) . zoom ( 10 ) . build ( ) ; googleMap . animateCamera ( CameraUpdateFactory . newCameraPosition ( cameraPosition ) ) ; mLatitudeText . setText ( String . valueOf ( location . getLatitude ( ) ) ) ; mLongitudeText . setText ( String . valueOf ( location . getLongitude ( ) ) ) ; <START_BUG> googleMap . addMarker ( new MarkerOptions ( ) . position ( point ) . title ( "Hello<seq2seq4repair_space>world" ) ) ; <END_BUG> if ( pointInPolygon ( point , polygon ) ) { deliverableRange . setText ( "YES!" ) ; } else { if ( ( ( ( pointInPolygon ( point , polygonRed1 ) ) || ( pointInPolygon ( point , polygonRed2 ) ) ) || ( pointInPolygon ( point , polygonRed3 ) ) ) || ( pointInPolygon ( point , polygonRed4 ) ) ) { deliverableRange . setText ( "YES<seq2seq4repair_space>for<seq2seq4repair_space>orders<seq2seq4repair_space>over<seq2seq4repair_space>$25!" ) ; } else { deliverableRange . setText ( "NO!" ) ; } } } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onMapReady ( GoogleMap map ) { } @ Override public void onConnected ( Bundle bundle ) { } public boolean pointInPolygon ( LatLng point , Polygon polygon ) { } public boolean rayCrossesSegment ( LatLng point , LatLng a , LatLng b ) { } protected void startLocationUpdates ( ) { } @ Override public void onConnectionSuspended ( int i ) { } @ Override public void onConnectionFailed ( ConnectionResult connectionResult ) { } @ Override public void onLocationChanged ( Location location ) { } }

Fix:
googleMap . addMarker ( new MarkerOptions ( ) . position ( point ) . title ( strAddress ) ) ;
Buggy code:
public class DatabaseSupport implements DatabaseSupportInterface { private static DatabaseSupport instance = null ; private Connection connection = null ; private String [ ] userColumns = new String [ ] { "username" , "type" , "name" , "password" } ; private String [ ] cardColumns = new String [ ] { "cardID" , "deckID" , "front" , "back" } ; private String [ ] quizColumns = new String [ ] { "quizID" , "deckID" , "ownerID" , "title" , "description" } ; private String [ ] deckColumns = new String [ ] { "deckID" , "ownerID" , "title" , "description" } ; private String [ ] courseColumns = new String [ ] { "courseID" , "title" , "ownerID" } ; private String [ ] quizRelationsColumns = new String [ ] { "quizID" , "studentID" } ; private String [ ] resultColumns = new String [ ] { "resultID" , "quizID" , "userID" , "answer" } ; private String [ ] courseRelationsColumns = new String [ ] { "courseID" , "userID" } ; private DatabaseSupport ( ) { } public static DatabaseSupport getInstance ( ) { } @ Override public User getUser ( String userID ) { } @ Override public Student getStudent ( String studentID ) { Student student = ( ( Student ) ( getUser ( studentID ) ) ) ; try { Statement stmt = connection . createStatement ( ) ; <START_BUG> String sql = DatabaseHelpers . select ( "quiz_relation" , quizRelationsColumns [ 0 ] , studentID ) ; <END_BUG> ResultSet quizIDs = stmt . executeQuery ( sql ) ; while ( quizIDs . next ( ) ) { Quiz currentQuiz = this . getQuiz ( quizIDs . getInt ( 2 ) ) ; student . addQuiz ( currentQuiz ) ; } quizIDs . close ( ) ; return student ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } return null ; } @ Override public boolean putStudent ( Student s ) { } @ Override public boolean putPrincipal ( Principal p ) { } @ Override public boolean putTeacher ( Teacher t ) { } @ Override public Deck getDeck ( int deckID ) { } @ Override public boolean putDeck ( Deck d ) { } public Card getCard ( int cardID ) { } @ Override public Quiz getQuiz ( int quizID ) { } @ Override public boolean putQuiz ( Quiz q ) { } private Connection getConnection ( ) { } @ Override public boolean putCourse ( Course c ) { } @ Override public Course getCourse ( int courseID ) { } @ Override public Teacher getTeacher ( String teacherID ) { } @ Override public boolean deleteDeck ( Deck d ) { } @ Override public boolean deleteQuiz ( Quiz q ) { } @ Override public boolean deleteCourse ( Course c ) { } @ Override public boolean deleteStudent ( Student s ) { } @ Override public boolean deleteTeacher ( Teacher t ) { } }

Fix:
String sql = DatabaseHelpers . select ( "quiz_relation" , quizRelationsColumns [ 1 ] , studentID ) ;
Buggy code:
public class Vec3f { public float x ; public float y ; public float z ; public Vec3f ( float x , float y , float z ) { } public Vec3f add ( Vec3f v ) { } public Vec3f sub ( Vec3f v ) { } public Vec3f cross ( Vec3f v ) { } public Vec3f mul ( float f ) { } public float mul ( Vec3f v ) { } public float norm ( ) { } public Vec3f normalize ( ) { } public Vec3f normalize ( int l ) { } public String toString ( ) { <START_BUG> return String . format ( "Vec3<seq2seq4repair_space>|<seq2seq4repair_space>x<seq2seq4repair_space>:<seq2seq4repair_space>%d;<seq2seq4repair_space>y<seq2seq4repair_space>:<seq2seq4repair_space>%d;<seq2seq4repair_space>z<seq2seq4repair_space>:<seq2seq4repair_space>%d" , ( ( int ) ( x ) ) , ( ( int ) ( y ) ) , ( ( int ) ( z ) ) ) ; <END_BUG> } }

Fix:
return String . format ( "Vec3f<seq2seq4repair_space>|<seq2seq4repair_space>x<seq2seq4repair_space>:<seq2seq4repair_space>%d;<seq2seq4repair_space>y<seq2seq4repair_space>:<seq2seq4repair_space>%d;<seq2seq4repair_space>z<seq2seq4repair_space>:<seq2seq4repair_space>%d" , ( ( int ) ( x ) ) , ( ( int ) ( y ) ) , ( ( int ) ( z ) ) ) ;
Buggy code:
public class ActivityAccount extends FragmentActivity { @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_account ) ; ActionBarCTR actionBarCTR = new ActionBarCTR ( ) ; actionBarCTR . setActionBar ( getActionBar ( ) , ic_action_back , title_activity_account ) ; ViewPager mViewPager = ( ( ViewPager ) ( findViewById ( pager ) ) ) ; <START_BUG> mViewPager . setAdapter ( new br . com . inmypocket . adapter . AccountViewPagerAdapter ( getFragmentManager ( ) ) ) ; <END_BUG> PagerSlidingTabStrip tabs = ( ( PagerSlidingTabStrip ) ( findViewById ( tab ) ) ) ; tabs . setViewPager ( mViewPager ) ; } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
mViewPager . setAdapter ( new br . com . inmypocket . adapter . AccountViewPagerAdapter ( this , getFragmentManager ( ) ) ) ;
Buggy code:
@ Service public class StationAffilateImpl implements StationAffilate { @ Autowired private AffilateDao affilateDao ; @ Autowired private OrderDao orderDao ; @ Autowired private ConversionService conversionService ; @ Override public void deleteOrder ( Affilate affilate , Order order ) { } @ Override public Set < Person > getAffiliateMechanics ( Affilate affiliate ) { } @ Override public Set < Order > getAffiliateOrders ( Affilate affiliate , Calendar startDate , Calendar endDate ) { } @ Override public Set < Order > getAffiliateReadyOrders ( Affilate affiliate , Calendar startDate , Calendar endDate ) { AffilateEntity affilateEntity = affilateDao . findById ( affiliate . getAffilateId ( ) ) ; Set < Order > orders = new HashSet < > ( ) ; for ( OrderEntity currentOrderEntity : affilateEntity . getOrders ( ) . keySet ( ) ) <START_BUG> if ( ( ( currentOrderEntity . getStatus ( ) . equals ( READY ) ) && ( ( currentOrderEntity . getCompleteDate ( ) . compareTo ( startDate ) ) >= 0 ) ) && ( ( currentOrderEntity . getCompleteDate ( ) . compareTo ( endDate ) ) <= 0 ) ) <END_BUG> orders . add ( conversionService . convert ( currentOrderEntity , Order . class ) ) ; return orders ; } }

Fix:
if ( ( ( ( currentOrderEntity . getStatus ( ) . equals ( READY ) ) && ( ( currentOrderEntity . getCompleteDate ( ) ) != null ) ) && ( ( currentOrderEntity . getCompleteDate ( ) . compareTo ( startDate ) ) >= 0 ) ) && ( ( currentOrderEntity . getCompleteDate ( ) . compareTo ( endDate ) ) <= 0 ) )
Buggy code:
public class LazyFluentIterable < TYPE > implements FluentIterable < TYPE > { private final Iterable < TYPE > iterable ; protected LazyFluentIterable ( Iterable < TYPE > iterable ) { } protected LazyFluentIterable ( ) { } @ Override public FluentIterable < TYPE > filter ( Predicate < ? super TYPE > predicate ) { } @ Override public Optional < TYPE > first ( ) { } @ Override public FluentIterable < TYPE > first ( int count ) { } @ Override public Optional < TYPE > last ( ) { } @ Override public FluentIterable < TYPE > last ( int count ) { } @ Override public < NEW_TYPE > FluentIterable < NEW_TYPE > map ( Function < ? super TYPE , NEW_TYPE > function ) { } @ Override public List < TYPE > asList ( ) { } @ Override public Iterator < TYPE > iterator ( ) { return new DecoratingIterator < TYPE > ( iterable . iterator ( ) ) { @ Override public TYPE computeNext ( ) { <START_BUG> return fromIterator . next ( ) ; <END_BUG> } } ; } public static final < TYPE > FluentIterable < TYPE > from ( Iterable < TYPE > iterable ) { } }

Fix:
return fromIterator . hasNext ( ) ? fromIterator . next ( ) : null ;
Buggy code:
<START_BUG> public class LoginActivityTest extends InjectedActivityTest < LoginActivity > { <END_BUG> public LoginActivityTest ( ) { } @ Override protected void setUp ( ) throws Exception { super . setUp ( ) ; getActivity ( ) ; } public void testEmptyEmailShowsError ( ) { } public void testInvalidEmailShowsError ( ) { } public void testShortPasswordShowsError ( ) { } public void testIncorrectPasswordShowsError ( ) { } }

Fix:
public class LoginActivityTest extends InjectedActivityTest {
Buggy code:
public class DataManager { public static final Integer TASK_ALREADY_EXISTS = - 3 ; public static final Integer MULTIPLE_MATCHES = - 2 ; public static final Integer TASK_NOT_FOUND = - 1 ; public static final Integer TASK_REMOVED = 1 ; public static final Integer TASK_ADDED = 2 ; public static final Integer TASK_SET_TO_DONE = 3 ; public static final Integer TASK_UPDATED = 4 ; private LocalStorage file ; private Gson gson ; private ArrayList < Task > taskList ; private ArrayList < Task > searchList ; public static DataManager instance = null ; private DataManager ( ) { } public static DataManager getInstance ( ) { } public void addNewTask ( Task taskToAdd ) { } public ArrayList < Task > listAll ( Command cmd ) { } public Integer removeTask ( Command cmd ) { searchList . clear ( ) ; searchTasksForMatches ( cmd ) ; switch ( searchList . size ( ) ) { case 0 : return DataManager . TASK_NOT_FOUND ; case 1 : taskList . remove ( searchList . get ( 0 ) ) ; file . clear ( ) ; <START_BUG> file . saveToFile ( tasksToStrings ( taskList ) ) ; <END_BUG> return DataManager . TASK_REMOVED ; default : LogicController . getInstance ( ) . chooseLine ( tasksToStrings ( searchList ) ) ; return DataManager . MULTIPLE_MATCHES ; } } public Integer removeTask ( int lineNum ) { } public Integer editTask ( Command cmd ) { } public Integer editTask ( int lineNum ) { } public Integer setDoneToTask ( Command cmd ) { } public Integer setDoneToTask ( int lineNum ) { } public Integer changeStorageLocation ( Command cmd ) { } private ArrayList < String > tasksToStrings ( ) { } private ArrayList < String > tasksToStrings ( ArrayList < Task > list ) { } private void sort ( ) { } private void sort ( ArrayList < Task > list ) { } private ArrayList < Task > initialiseTaskList ( ) { } private void searchTasksForMatches ( Command cmd ) { } }

Fix:
file . saveToFile ( tasksToStrings ( ) ) ;
Buggy code:
public class Substring extends AbstractVal { private final Val _val1 ; private final Val _val2 ; private ClassMetaData _meta = null ; public Substring ( Val val1 , Val val2 ) { } public Val getVal1 ( ) { } public Val getVal2 ( ) { } public ClassMetaData getMetaData ( ) { } public void setMetaData ( ClassMetaData meta ) { } public Class getType ( ) { } public void setImplicitType ( Class type ) { } public ExpState initialize ( Select sel , ExpContext ctx , int flags ) { } public void select ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void selectColumns ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void groupBy ( Select sel , ExpContext ctx , ExpState state ) { } public void orderBy ( Select sel , ExpContext ctx , ExpState state , boolean asc ) { <START_BUG> sel . orderBy ( newSQLBuffer ( sel , ctx , state ) , asc , false ) ; <END_BUG> } private SQLBuffer newSQLBuffer ( Select sel , ExpContext ctx , ExpState state ) { } public Object load ( ExpContext ctx , ExpState state , Result res ) throws SQLException { } public void calculateValue ( Select sel , ExpContext ctx , ExpState state , Val other , ExpState otherState ) { } public int length ( Select sel , ExpContext ctx , ExpState state ) { } public void appendTo ( Select sel , ExpContext ctx , ExpState state , SQLBuffer sql , int index ) { } public void acceptVisit ( ExpressionVisitor visitor ) { } public int getId ( ) { } }

Fix:
sel . orderBy ( newSQLBuffer ( sel , ctx , state ) , asc , false , getSelectAs ( ) ) ;
Buggy code:
public class RunTestNotifier extends Notifier { private final Statement fNext ; public RunTestNotifier ( Statement next ) { } @ Override public void run ( EachTestNotifier context ) { context . fireTestStarted ( ) ; try { fNext . evaluate ( ) ; } catch ( AssumptionViolatedException e ) { <START_BUG> context . addFailedAssumption ( e ) ; <END_BUG> } catch ( Throwable e ) { context . addFailure ( e ) ; } finally { context . fireTestFinished ( ) ; } } }

Fix:
context . fireTestIgnored ( ) ;
Buggy code:
public class RunningSample { private static final DecimalFormat rateFormatter = new DecimalFormat ( "#.0" ) ; private static final DecimalFormat errorFormatter = new DecimalFormat ( "#0.00%" ) ; private long counter ; private long runningSum ; private long max ; private long min ; private long errorCount ; private long firstTime ; private long lastTime ; private final String label ; private final int index ; public RunningSample ( String label , int index ) { } public RunningSample ( RunningSample src ) { } private void init ( ) { } public void clear ( ) { } public long getElapsed ( ) { } public double getRate ( ) { } public double getRatePerMin ( ) { } public String getRateString ( ) { } public String getLabel ( ) { } public int getIndex ( ) { } public void addSample ( SampleResult res ) { } public void addSample ( RunningSample rs ) { } public long getMin ( ) { } public long getMax ( ) { } public long getAverage ( ) { } public long getNumSamples ( ) { } public double getErrorPercentage ( ) { } public String getErrorPercentageString ( ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer mySB = new StringBuffer ( ) ; <END_BUG> mySB . append ( ( ( "Samples:<seq2seq4repair_space>" + ( this . getNumSamples ( ) ) ) + "<seq2seq4repair_space>" ) ) ; mySB . append ( ( ( "Avg:<seq2seq4repair_space>" + ( this . getAverage ( ) ) ) + "<seq2seq4repair_space>" ) ) ; mySB . append ( ( ( "Min:<seq2seq4repair_space>" + ( this . getMin ( ) ) ) + "<seq2seq4repair_space>" ) ) ; mySB . append ( ( ( "Max:<seq2seq4repair_space>" + ( this . getMax ( ) ) ) + "<seq2seq4repair_space>" ) ) ; mySB . append ( ( ( "Error<seq2seq4repair_space>Rate:<seq2seq4repair_space>" + ( this . getErrorPercentageString ( ) ) ) + "<seq2seq4repair_space>" ) ) ; mySB . append ( ( "Sample<seq2seq4repair_space>Rate:<seq2seq4repair_space>" + ( this . getRateString ( ) ) ) ) ; return mySB . toString ( ) ; } public long getErrorCount ( ) { } }

Fix:
StringBuilder mySB = new StringBuilder ( ) ;
Buggy code:
public class Game { private Parser parser ; private Room currentRoom ; public static ResourceBundle res ; private Locale locale ; private Student gamer ; public static final int NB_COURSES = 3 ; public static final String [ ] COURSES = new String [ ] { "OOP" , "C" , "ALGO" } ; public static final String [ ] COURSESBUNDLEKEY = new String [ ] { "oop.lecture1" , "oop.lecture2" , "oop.lecture3" , "c.lecture1" , "c.lecture2" , "c.lecture3" , "algo.lecture1" , "algo.lecture2" , "algo.lecture3" } ; public static List < LabItem > labs = new ArrayList < LabItem > ( ) ; public static List < LectureItem > lectures = new ArrayList < LectureItem > ( ) ; public static ArrayList < Person > people = new ArrayList < Person > ( ) ; private HashMap < String , Room > hashmapRoom = new HashMap < String , Room > ( ) ; Scanner scanner = new Scanner ( System . in ) ; HashMap < String , PayingObject > listPayingObject ; private School school ; public Game ( ) { } private void initPayingObject ( ) { } private void getLanguage ( ) { } private void createSchool ( ) { } public void play ( ) { } private void printWelcome ( ) { } private void createPersons ( ) { } private void printGamer ( ) { } private void createCourses ( ) { } private boolean processCommand ( Command command ) { } private void printPeopleInRoom ( ) { } private void goRoom ( Command command ) { if ( ! ( command . hasSecondWord ( ) ) ) { Display . displayError ( Game . res . getString ( "game.where" ) ) ; return ; } String direction = command . getSecondWord ( ) ; Room nextRoom = currentRoom . getExit ( direction ) ; if ( nextRoom == null ) { Display . displayError ( Game . res . getString ( "game.nodoor" ) ) ; } else if ( nextRoom . enter ( gamer ) ) { currentRoom = nextRoom ; printPeopleInRoom ( ) ; int i ; for ( i = 0 ; i < ( Game . people . size ( ) ) ; i ++ ) { Game . people . get ( i ) . randomMove ( ) ; } } else { <START_BUG> Display . display ( currentRoom . getLongDescription ( ) ) ; <END_BUG> } } private boolean quit ( Command command ) { } public Parser getParser ( ) { } public void setParser ( Parser parser ) { } }

Fix:
Display . displayln ( currentRoom . getLongDescription ( ) ) ;
Buggy code:
public class CalcController { public static final String SUM = "SUM" ; public static final String SUBTRACT = "SUBTRACT" ; public static final String MULTIPLY = "MULTIPLY" ; public static final String DIVIDE = "DIVIDE" ; public static final String CLEAR = "CLEAR" ; private CalcModel model ; private GraphModel graphModel ; private CalcView view ; public CalcController ( ) { } public CalcController ( CalcModel modelIn , GraphModel graphModelIn ) { } public void sum ( ) { } public void subtract ( ) { } public void multiply ( ) { } public void divide ( ) { } public void pi ( ) { } public void factorial ( ) { } public void sin ( ) { } public void cos ( ) { } public void clear ( ) { } public void variable ( ) { } public void setValue ( int value ) { } private void showValue ( ) { } public void empty ( ) { } public void undo ( ) { } public void addValue ( BigDecimal value ) { } public void addToRounding ( String value ) { } public void printInfoToConsole ( ) { } public void pushUserText ( ) { } public void runTestCase ( ) { } public ChartPanel getChartPanel ( ) { <START_BUG> String expression = model . getExpressionValue ( ) ; <END_BUG> graphModel . pushExpression ( expression ) ; return graphModel . getChartPanel ( ) ; } No newline ; at end ; of file ; }

Fix:
String expression = model . getEquation ( ) ;
Buggy code:
public class WorkerJvmFailureMonitor { private static final Logger LOGGER = Logger . getLogger ( WorkerJvmFailureMonitor . class ) ; private static final int LAST_SEEN_TIMEOUT_MS = 60 * 1000 ; private final Agent agent ; private final BlockingQueue < Failure > failureQueue = new LinkedBlockingQueue < Failure > ( ) ; private final WorkerJvmFailureMonitor . FailureMonitorThread failureMonitorThread = new WorkerJvmFailureMonitor . FailureMonitorThread ( ) ; public WorkerJvmFailureMonitor ( Agent agent ) { } public void drainFailures ( List < Failure > failures ) { } public void publish ( Failure failure ) { } public void start ( ) { } private void detect ( ) { } private void detectFailuresInJvm ( WorkerJvm jvm ) { } private void detectInactivity ( WorkerJvm jvm , List < Failure > failures ) { } private void detectExceptions ( WorkerJvm workerJvm , List < Failure > failures ) { File workerHome = workerJvm . workerHome ; if ( ! ( workerHome . exists ( ) ) ) { return ; } File [ ] exceptionFiles = workerHome . listFiles ( new FilenameFilter ( ) { @ Override public boolean accept ( File dir , String name ) { return name . endsWith ( ".exception" ) ; } } ) ; if ( exceptionFiles == null ) { return ; } for ( File exceptionFile : exceptionFiles ) { String content = fileAsText ( exceptionFile ) ; <START_BUG> int indexOf = content . indexOf ( "\n" ) ; <END_BUG> String testId = content . substring ( 0 , indexOf ) ; String cause = content . substring ( ( indexOf + 1 ) ) ; deleteQuiet ( exceptionFile ) ; Failure failure = new Failure ( ) ; failure . message = "Worked<seq2seq4repair_space>ran<seq2seq4repair_space>into<seq2seq4repair_space>an<seq2seq4repair_space>unhandled<seq2seq4repair_space>exception" ; failure . type = Type . WORKER_EXCEPTION ; failure . agentAddress = getHostAddress ( ) ; failure . workerAddress = workerJvm . memberAddress ; failure . workerId = workerJvm . id ; failure . testId = testId ; failure . testSuite = agent . getTestSuite ( ) ; failure . cause = cause ; failures . add ( failure ) ; } } public static class HProfExtFilter implements FilenameFilter { public boolean accept ( File dir , String name ) { } } private void detectOomeFailure ( WorkerJvm jvm , List < Failure > failures ) { } private boolean isOomeFound ( WorkerJvm jvm ) { } private void detectUnexpectedExit ( WorkerJvm jvm , List < Failure > failures ) { } private class FailureMonitorThread extends Thread { public FailureMonitorThread ( ) { } public void run ( ) { } } }

Fix:
int indexOf = content . indexOf ( '\n' ) ;
Buggy code:
public class DataSerializerFactoryTest { @ Test public void testSerialization ( ) throws Exception { } @ Test public void testAppDataFormatter ( ) { DataSerializerFactory dsf = new DataSerializerFactory ( new AppDataFormatter ( ) ) ; <START_BUG> dsf . getAppDataFormatter ( ) . setDecimalFormatString ( "#.##" ) ; <END_BUG> } }

Fix:
dsf . getAppDataFormatter ( ) . setContinuousFormatString ( "#.##" ) ;
Buggy code:
public class MappingJackson2JsonView extends AbstractView { public static final String DEFAULT_CONTENT_TYPE = "application//json" ; private ObjectMapper objectMapper = new ObjectMapper ( ) ; private JsonEncoding encoding = JsonEncoding . UTF8 ; private boolean prefixJson = false ; private Boolean prettyPrint ; private Set < String > modelKeys ; private boolean extractValueFromSingleKeyModel = false ; private boolean disableCaching = true ; private boolean updateContentLength = false ; public MappingJackson2JsonView ( ) { } public void setObjectMapper ( ObjectMapper objectMapper ) { } private void configurePrettyPrint ( ) { } public void setEncoding ( JsonEncoding encoding ) { } public void setPrefixJson ( boolean prefixJson ) { } public void setPrettyPrint ( boolean prettyPrint ) { } public void setModelKey ( String modelKey ) { } public void setModelKeys ( Set < String > modelKeys ) { } public Set < String > getModelKeys ( ) { } @ Deprecated public void setRenderedAttributes ( Set < String > renderedAttributes ) { } @ Deprecated public Set < String > getRenderedAttributes ( ) { } public void setExtractValueFromSingleKeyModel ( boolean extractValueFromSingleKeyModel ) { } public void setDisableCaching ( boolean disableCaching ) { } public void setUpdateContentLength ( boolean updateContentLength ) { } @ Override protected void prepareResponse ( HttpServletRequest request , HttpServletResponse response ) { <START_BUG> response . setContentType ( getContentType ( ) ) ; <END_BUG> response . setCharacterEncoding ( this . encoding . getJavaName ( ) ) ; if ( this . disableCaching ) { response . addHeader ( "Pragma" , "no-cache" ) ; response . addHeader ( "Cache-Control" , "no-cache,<seq2seq4repair_space>no-store,<seq2seq4repair_space>max-age=0" ) ; response . addDateHeader ( "Expires" , 1L ) ; } } @ Override protected void renderMergedOutputModel ( Map < String , Object > model , HttpServletRequest request , HttpServletResponse response ) throws Exception { } protected Object filterModel ( Map < String , Object > model ) { } }

Fix:
setResponseContentType ( request , response ) ;
Buggy code:
public class ProgramLauncher { public static void main ( String [ ] args ) { final MainPanel mp ; int frameSizeX = 1000 ; int frameSizeY = 1000 ; <START_BUG> int delay = 100 ; <END_BUG> JFrame application = new JFrame ( ) ; application . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; application . setSize ( frameSizeX , frameSizeY ) ; mp = new MainPanel ( frameSizeX , frameSizeY , delay ) ; application . add ( mp ) ; application . setVisible ( true ) ; ActionListener timerTask = new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { mp . tick ( ) ; mp . repaint ( ) ; } } ; Timer timer = new Timer ( delay , timerTask ) ; timer . start ( ) ; } }

Fix:
int delay = 40 ;
Buggy code:
public class TestEJBEmbedded extends SingleEMFTestCase { private static final String CLOB ; public void setUp ( ) { <START_BUG> setUp ( EmbedOwner . class , EmbedValue . class , CLEAR_TABLES , "openjpa.Log" , "SQL=trace" ) ; <END_BUG> } public void testEmbedded ( ) { } public void testEmbeddedMetaData ( ) { } private void nullTestLogic ( boolean cache ) { } public void testNullNoCache ( ) { } public void testNullCacheEnabled ( ) { } public void testMappingTransferAndOverride ( ) { } }

Fix:
setUp ( EmbedOwner . class , EmbedValue . class , CLEAR_TABLES ) ;