nus-yam/ex-repair huggingface dataset:
Buggy code:
public class VoiceOutputAssistant implements OnInitListener { private final Context context ; private TextToSpeech mTts ; private boolean isTTSInitialized ; private String lastTextToSpeak ; @ Inject public VoiceOutputAssistant ( @ ForApplication Context context ) { } public boolean isTTSInitialized ( ) { } public void initTTS ( ) { } public void speak ( String textToSpeak ) { if ( ( ( mTts ) != null ) && ( isTTSInitialized ) ) { final String id = UUID . randomUUID ( ) . toString ( ) ; Timber . d ( "%s:<seq2seq4repair_space>%s<seq2seq4repair_space>(%s)" , mTts , textToSpeak , id ) ; mTts . setOnUtteranceCompletedListener ( new TextToSpeech . OnUtteranceCompletedListener ( ) { @ Override public void onUtteranceCompleted ( String utteranceId ) { <START_BUG> Timber . d ( "%s:<seq2seq4repair_space>onUtteranceCompleted<seq2seq4repair_space>%s" , utteranceId ) ; <END_BUG> if ( utteranceId . equals ( id ) ) { shutdown ( ) ; } } } ) ; mTts . speak ( textToSpeak , QUEUE_ADD , new HashMap < String , String > ( ) { } ) ; } else { lastTextToSpeak = textToSpeak ; initTTS ( ) ; } } public void onInit ( int status ) { } public void shutdown ( ) { } }

Fix:
Timber . d ( "%s:<seq2seq4repair_space>onUtteranceCompleted" , utteranceId ) ;
Buggy code:
public class Member implements Comparable { ID member ; Object data ; public Member ( ID member ) { } public Member ( ID member , Object data ) { } public boolean equals ( Object o ) { } public int hashCode ( ) { } public int compareTo ( Object o ) { } public ID getID ( ) { } public Object getData ( ) { } public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( ) ; <END_BUG> sb . append ( "Member[" ) . append ( member ) . append ( ";" ) . append ( data ) . append ( "]" ) ; return sb . toString ( ) ; } }

Fix:
final StringBuffer sb = new StringBuffer ( ) ;
Buggy code:
public class TestPrefixQuery extends LuceneTestCase { public void testPrefixQuery ( ) throws Exception { RAMDirectory directory = new RAMDirectory ( ) ; String [ ] categories = new String [ ] { "//Computers" , "//Computers//Mac" , "//Computers//Windows" } ; IndexWriter writer = new IndexWriter ( directory , new WhitespaceAnalyzer ( ) , true , MaxFieldLength . LIMITED ) ; for ( int i = 0 ; i < ( categories . length ) ; i ++ ) { Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( "category" , categories [ i ] , Store . YES , Index . NOT_ANALYZED ) ) ; writer . addDocument ( doc ) ; } writer . close ( ) ; PrefixQuery query = new PrefixQuery ( new Term ( "category" , "//Computers" ) ) ; <START_BUG> IndexSearcher searcher = new IndexSearcher ( directory ) ; <END_BUG> ScoreDoc [ ] hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( "All<seq2seq4repair_space>documents<seq2seq4repair_space>in<seq2seq4repair_space>//Computers<seq2seq4repair_space>category<seq2seq4repair_space>and<seq2seq4repair_space>below" , 3 , hits . length ) ; query = new PrefixQuery ( new Term ( "category" , "//Computers//Mac" ) ) ; hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( "One<seq2seq4repair_space>in<seq2seq4repair_space>//Computers//Mac" , 1 , hits . length ) ; } }

Fix:
IndexSearcher searcher = new IndexSearcher ( directory , true ) ;
Buggy code:
public class AfterLast extends Instruction implements Evaluable { public static final AfterLast _ = new AfterLast ( ) ; private AfterLast ( ) { } @ Override public OnQuestion onCalcQuestion ( ) { } class Calc extends OnQuestion { @ Override public void act ( final PFlow pf ) { Relationship [ ] params = Order . first ( 3 , pf . getOP ( ) . getStartNode ( ) ) ; String pattern ; try { <START_BUG> pattern = STRING . serialize ( params [ 1 ] ) ; <END_BUG> } catch ( IOException e ) { pf . sendException ( e ) ; return ; } String source ; try { source = STRING . serialize ( pf . getVector ( ) . question2 ( params [ 2 ] ) ) ; } catch ( Exception e ) { pf . sendException ( e ) ; return ; } int index = source . lastIndexOf ( pattern ) ; if ( index != ( - 1 ) ) { Relationship r ; try { r = new org . animotron . expression . JExpression ( value ( source . substring ( ( index + 1 ) ) ) ) ; } catch ( Exception e ) { pf . sendException ( e ) ; return ; } answered ( pf , r ) ; } } } No newline ; at end ; of file ; }

Fix:
pattern = STRING . serialize ( pf . getVector ( ) . question2 ( params [ 1 ] ) ) ;
Buggy code:
public class RuleEditorController implements Controller { @ FXML TextField ruleName ; @ FXML ComboBox conditionType ; @ FXML VBox filterCoditions ; @ FXML Hyperlink addNewAction ; @ FXML VBox actions ; @ Inject @ Any Instance < Object > instances ; private Node view ; private GameRule gameRule ; private EventSheet eventSheet ; private EventSheetEditorController parentController ; private Map < String , Class > knownEventTypes ; private List < Class < ? extends Action > > knownActions ; RuleEditorController initialize ( EventSheetEditorController aParentController , BorderPane aView , EventSheet aEventSheet , GameRule aGameRule ) { } private void setupConditionSelection ( ) { } private void setConditionType ( ) { } private void updateActions ( ) { } private ConditionEditorType createConditionEditorQualifier ( final Class aClass ) { } private ActionEditorType createActionEditorQualifier ( final Class aClass ) { } private void updateFilterConditions ( ) { } @ Override public Node getView ( ) { } @ FXML public void onRemoveRule ( ) { } @ FXML public void onAddNewAction ( ) { ContextMenu theContextMenu = new ContextMenu ( ) ; for ( Class < ? extends Action > theActionClass : knownActions ) { final Class < ? extends Action > theFinalAction = theActionClass ; <START_BUG> MenuItem theItem = new MenuItem ( theActionClass . getSimpleName ( ) ) ; <END_BUG> theItem . setOnAction ( ( actionEvent ) -> { try { Action theNewAction = theFinalAction . newInstance ( ) ; gameRule . addAction ( theNewAction ) ; updateActions ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } ) ; theContextMenu . getItems ( ) . add ( theItem ) ; } theContextMenu . show ( addNewAction , Side . BOTTOM , 0 , 0 ) ; } public void removed ( ) { } No newline ; at end ; of file ; }

Fix:
MenuItem theItem = new MenuItem ( theActionClass . getSimpleName ( ) . replace ( "Action" , "" ) ) ;
Buggy code:
public class Parcelling extends Grid < Parcel > { private static int RESOLUTION = 10 ; public Parcelling ( Map map ) { } private static int inParcellingSpace ( double valInMapSpace ) { } private static Point2D inParcellingSpace ( Point2D pInMapSpace ) { } public List < Parcel > getParcelsContaining ( List < Tile > tiles ) { } public List < Parcel > updateParcelsContaining ( List < Tile > tiles ) { } private List < Triangle3D > getGroundTriangles ( Tile t , Parcel parcel ) { if ( ( ( t . e ( ) ) == null ) || ( ( t . n ( ) ) == null ) ) { return new ArrayList < > ( ) ; } if ( parcel . triangles . containsKey ( t ) ) { if ( parcel . triangles . get ( t ) . isEmpty ( ) ) { if ( t . hasCliff ( ) ) { parcel . triangles . get ( t ) . addAll ( getCliffGrounds ( t ) ) ; } else { parcel . triangles . get ( t ) . addAll ( getTileGround ( t ) ) ; } } return parcel . triangles . get ( t ) ; } for ( Parcel n : get8Around ( parcel ) ) { for ( Tile tile : n . triangles . keySet ( ) ) { if ( tile . equals ( t ) ) { return getGroundTriangles ( t , n ) ; } } } <START_BUG> throw new exception . TechnicalException ( ( "Ground<seq2seq4repair_space>Triangle<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found,<seq2seq4repair_space>this<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>happed.<seq2seq4repair_space>tile<seq2seq4repair_space>:<seq2seq4repair_space>" + ( t . getCoord ( ) ) ) ) ; <END_BUG> } private List < Triangle3D > getTileGround ( Tile t ) { } private List < Triangle3D > getCliffGrounds ( Tile t ) { } private Polygon3D getGroundPolygon ( Tile t , Cliff c , Ring < Point3D > groundPoints ) { } private double getElevation ( Tile t , Cliff c ) { } public List < Triangle3D > getNearbyTriangles ( Tile t , Map map , Parcel parcel ) { } public void compute ( Map map , Parcel parcel ) { } }

Fix:
throw new exception . TechnicalException ( ( "Ground<seq2seq4repair_space>Triangle<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found,<seq2seq4repair_space>this<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>happen.<seq2seq4repair_space>tile<seq2seq4repair_space>:<seq2seq4repair_space>" + ( t . getCoord ( ) ) ) ) ;
Buggy code:
public class SaveGraphicsService { public static final int PNG = 0 ; public static final int TIFF = 1 ; public static final String PNG_EXTENSION = ".png" ; public static final String TIFF_EXTENSION = ".tif" ; public static final String JPEG_EXTENSION = ".jpg" ; public SaveGraphicsService ( ) { } public void saveJComponent ( String filename , int type , JComponent component ) { Dimension size = component . getSize ( ) ; <START_BUG> BufferedImage image = new BufferedImage ( size . width , size . height , BufferedImage . TYPE_INT_RGB ) ; <END_BUG> Graphics2D grp = image . createGraphics ( ) ; component . paint ( grp ) ; if ( type == ( SaveGraphicsService . PNG ) ) { filename += SaveGraphicsService . PNG_EXTENSION ; this . savePNGWithBatik ( filename , image ) ; } else if ( type == ( SaveGraphicsService . TIFF ) ) { filename = filename + ( SaveGraphicsService . TIFF_EXTENSION ) ; this . saveTIFFWithBatik ( filename , image ) ; } } public void savePNGWithBatik ( String filename , BufferedImage image ) { } public void saveTIFFWithBatik ( String filename , BufferedImage image ) { } private FileOutputStream createFile ( File filename ) { } }

Fix:
BufferedImage image = new BufferedImage ( size . width , size . height , BufferedImage . TYPE_BYTE_INDEXED ) ;
Buggy code:
public class Localizer { private static final Log log = LogFactory . getLog ( Localizer . class ) ; private Application application ; public Localizer ( final Application application ) { } public String getString ( final String key , final Component component ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final Component component , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model , final Locale locale , final String style , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final String path , final List searchStack , final Locale locale , final String style ) throws MissingResourceException { } private List getComponentStack ( final Component component ) { } private String substitutePropertyExpressions ( final Component component , final String string , final IModel model ) { if ( ( string != null ) && ( model != null ) ) { <START_BUG> return PropertyVariableInterpolator . interpolate ( string , model . getObject ( component ) ) ; <END_BUG> } return string ; } private String visitResourceLoaders ( final String key , final String path , final List searchStack , final Locale locale , final String style ) { } }

Fix:
return PropertyVariableInterpolator . interpolate ( string , model . getObject ( ) ) ;
Buggy code:
public class DrinksApplication extends Application { @ Override public void onCreate ( ) { super . onCreate ( ) ; String apiPrefKey = getString ( pref_apiendpoint_key ) ; String versionCodePrefKey = getString ( pref_versioncode_key ) ; String apiDefaultValue = getString ( pref_apiendpoint_default ) ; String server ; try { PackageInfo packageInfo = getPackageManager ( ) . getPackageInfo ( getPackageName ( ) , 0 ) ; int versionCode = packageInfo . versionCode ; int lastVersionCode = PreferenceManager . getDefaultSharedPreferences ( this ) . getInt ( versionCodePrefKey , 0 ) ; if ( lastVersionCode < versionCode ) { server = apiDefaultValue ; SharedPreferences . Editor editor = PreferenceManager . getDefaultSharedPreferences ( this ) . edit ( ) ; editor . putInt ( versionCodePrefKey , versionCode ) ; editor . putString ( apiPrefKey , apiDefaultValue ) ; <START_BUG> editor . commit ( ) ; <END_BUG> } else { server = PreferenceManager . getDefaultSharedPreferences ( this ) . getString ( apiPrefKey , apiDefaultValue ) ; } } catch ( PackageManager e ) { server = apiDefaultValue ; } DrinksProvider . updateServer ( server ) ; } }

Fix:
editor . apply ( ) ;
Buggy code:
public class AddLiquorActivity extends ActionBarActivity { private String [ ] navTitles ; private DrawerLayout mDrawerLayout ; private ListView mDrawerList ; private boolean mTwoPane ; private CharSequence mTitle ; private CharSequence mDrawerTitle ; private ActionBarDrawerToggle mDrawerToggle ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private boolean selectItem ( int position ) { if ( position == 0 ) { Intent newLoginIntent = new Intent ( this , LoginActivity . class ) ; startActivity ( newLoginIntent ) ; return true ; } if ( position == 1 ) { <START_BUG> Intent newBeerIntent = new Intent ( this , AddLiquorActivity . class ) ; <END_BUG> startActivity ( newBeerIntent ) ; return true ; } if ( position == 2 ) { Toast . makeText ( this , "You<seq2seq4repair_space>already<seq2seq4repair_space>are<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>add<seq2seq4repair_space>beer<seq2seq4repair_space>page" , LENGTH_SHORT ) . show ( ) ; return true ; } if ( position == 3 ) { Toast . makeText ( this , "Pretend<seq2seq4repair_space>this<seq2seq4repair_space>goes<seq2seq4repair_space>to<seq2seq4repair_space>mixed<seq2seq4repair_space>drink" , LENGTH_SHORT ) . show ( ) ; return true ; } if ( position == 4 ) { Intent newMenuIntent = new Intent ( this , TypeActivity . class ) ; startActivity ( newMenuIntent ) ; return true ; } mDrawerList . setItemChecked ( position , true ) ; setTitle ( navTitles [ position ] ) ; mDrawerLayout . closeDrawer ( mDrawerList ) ; return false ; } private class DrawerItemClickListener implements ListView . OnItemClickListener { @ Override public void onItemClick ( AdapterView parent , View view , int position , long id ) { } } }

Fix:
Intent newBeerIntent = new Intent ( this , AddBeerActivity . class ) ;
Buggy code:
public class ModClusterEnable implements OperationStepHandler , DescriptionProvider { static final ModClusterEnable INSTANCE = new ModClusterEnable ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( context . isNormalServer ( ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; modcluster . enable ( ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( ( context . isNormalServer ( ) ) && ( ( context . getServiceRegistry ( false ) . getService ( NAME ) ) != null ) ) {
Buggy code:
@ JawrDWRTestConfigFiles ( webXml = "net//jawr//web//standard//config//web.xml" , jawrConfig = "net//jawr//web//standard//config//jawr.properties" , dwrConfig = "net//jawr//web//standard//config//dwr.xml" ) public class MainPageTest extends AbstractDwrPageTest { protected String getPageUrl ( ) { } @ Test public void testPageLoad ( ) throws Exception { } @ Test public void checkGeneratedJsLinks ( ) { } @ Test public void testJsBundleContent ( ) throws Exception { } @ Test public void checkGeneratedCssLinks ( ) { final List < HtmlLink > styleSheets = getHtmlLinkTags ( ) ; assertEquals ( 1 , styleSheets . size ( ) ) ; final HtmlLink css = styleSheets . get ( 0 ) ; <START_BUG> assertEquals ( ( ( getUrlPrefix ( ) ) + "//css//61573181//fwk//core//component.css" ) , css . getHrefAttribute ( ) ) ; <END_BUG> } @ Test public void testCssBundleContent ( ) throws Exception { } @ Test public void checkGeneratedHtmlImageLinks ( ) { } @ Test public void checkGeneratedHtmlImageInputLinks ( ) { } }

Fix:
assertEquals ( ( ( getUrlPrefix ( ) ) + "//css//2049149885//fwk//core//component.css" ) , css . getHrefAttribute ( ) ) ;
Buggy code:
public class ExpressionStateTests extends ExpressionTestCase { @ Test public void testConstruction ( ) { } @ Test public void testLocalVariables ( ) { } @ Test public void testVariables ( ) { } @ Test public void testNoVariableInteference ( ) { } @ Test public void testLocalVariableNestedScopes ( ) { } @ Test public void testRootContextObject ( ) { ExpressionState state = getState ( ) ; Assert . assertEquals ( Inventor . class , state . getRootContextObject ( ) . getValue ( ) . getClass ( ) ) ; ( ( StandardEvaluationContext ) ( state . getEvaluationContext ( ) ) ) . setRootObject ( null ) ; Assert . assertEquals ( Inventor . class , state . getRootContextObject ( ) . getValue ( ) . getClass ( ) ) ; state = new ExpressionState ( new StandardEvaluationContext ( ) ) ; Assert . assertEquals ( NULL , state . getRootContextObject ( ) ) ; <START_BUG> ( ( StandardEvaluationContext ) ( state . getEvaluationContext ( ) ) ) . setRootObject ( null , TypeDescriptor . NULL ) ; <END_BUG> Assert . assertEquals ( null , state . getRootContextObject ( ) . getValue ( ) ) ; } @ Test public void testActiveContextObject ( ) { } @ Test public void testPopulatedNestedScopes ( ) { } @ Test public void testRootObjectConstructor ( ) { } @ Test public void testPopulatedNestedScopesMap ( ) { } @ Test public void testOperators ( ) throws Exception { } @ Test public void testComparator ( ) { } @ Test public void testTypeLocator ( ) throws EvaluationException { } @ Test public void testTypeConversion ( ) throws EvaluationException { } @ Test public void testPropertyAccessors ( ) { } private ExpressionState getState ( ) { } private EvaluationContext getContext ( ) { } }

Fix:
( ( StandardEvaluationContext ) ( state . getEvaluationContext ( ) ) ) . setRootObject ( null ) ;
Buggy code:
public class SharedObjectContainerFactory implements ISharedObjectContainerFactory { protected static ISharedObjectContainerFactory instance = null ; protected SharedObjectContainerFactory ( ) { } public static ISharedObjectContainerFactory getDefault ( ) { } private static void trace ( String msg ) { <START_BUG> Trace . trace ( Activator . getDefault ( ) , msg ) ; <END_BUG> } public ISharedObjectContainer createSharedObjectContainer ( ContainerTypeDescription desc , Object [ ] args ) throws ContainerCreateException { } public ISharedObjectContainer createSharedObjectContainer ( String descriptionName ) throws ContainerCreateException { } public ISharedObjectContainer createSharedObjectContainer ( String descriptionName , Object [ ] args ) throws ContainerCreateException { } }

Fix:
Trace . trace ( PLUGIN_ID , msg ) ;
Buggy code:
public class ExternalLocales { public static String getText ( Locale locale , String key ) { } public static String getText ( Locale locale , String key , Object ... params ) { <START_BUG> return MessageFormat . format ( ExternalLocales . getText ( locale , key ) , params ) ; <END_BUG> } public static String getText ( Locale locale , String key , Collection < ? > params ) { } private static ResourceBundle getResourceBundle ( Locale locale ) { } private static ResourceBundle loadBundle ( Locale locale ) { } private static Map < Locale , ResourceBundle > bundles = new HashMap < Locale , ResourceBundle > ( ) ; }

Fix:
return new MessageFormat ( ExternalLocales . getText ( locale , key ) , locale ) . format ( params ) ;
Buggy code:
public class ShadowDrawable extends Drawable { private static final float DEPTH_MAX = 5 ; private ShadowDrawable . ShadowState mState ; public ShadowDrawable ( ) { } ShadowDrawable ( ShadowDrawable . ShadowState state ) { } public void destroy ( ) { } @ Override public void draw ( Canvas canvas ) { } @ Override public int getAlpha ( ) { } @ Override public void setAlpha ( int alpha ) { } @ Override public void setColorFilter ( ColorFilter cf ) { } @ Override public int getOpacity ( ) { } public void setRenderScript ( RenderScript renderScript ) { } public void setMaskDrawer ( Drawer drawer ) { } public float getDepth ( ) { } public void setDepth ( float depth ) { } public float getRotation ( ) { } public void setRotation ( float rotation ) { } public OnStateChangedListener getOnStateChangedListener ( ) { } public void setOnStateChangedListener ( OnStateChangedListener listener ) { } @ Override public boolean setState ( int [ ] stateSet ) { } @ Override protected boolean onStateChange ( int [ ] stateSet ) { } @ Override protected void onBoundsChange ( Rect bounds ) { } public void setContext ( Context context ) { try { mState . mRender . setRenderScript ( RenderScript . create ( context ) ) ; <START_BUG> } catch ( Error error ) { <END_BUG> error . printStackTrace ( ) ; } Utils . init ( context ) ; } @ Override public ConstantState getConstantState ( ) { } static class Shadow { private static final float SHADOW_OFFSET_A = 0.57F ; private static final float SHADOW_OFFSET_B = 0.91F ; private static final float SHADOW_BLUR_RADIUS_OFFSET_FACTOR = 1.5F ; float mDepth ; Rect mBounds ; float mRotation ; int mAlpha ; Drawer mMaskDrawer ; public Shadow ( ) { } public Shadow ( ShadowDrawable . Shadow o ) { } public float getShadowBlurRadius ( ) { } public float getShadowOffset ( ) { } } private static class ShadowState extends ConstantState { ShadowDrawable . Shadow mShadow ; ShadowRender mRender ; OnStateChangedListener mOnStateChangedListener ; ShadowState ( ShadowDrawable . ShadowState orig ) { } private void initWithState ( ShadowDrawable . ShadowState orig ) { } private void initWithoutState ( ) { } public void destroy ( ) { } public void setRenderScript ( RenderScript renderScript ) { } @ Override public Drawable newDrawable ( ) { } @ Override public int getChangingConfigurations ( ) { } } }

Fix:
} catch ( Throwable error ) {
Buggy code:
public class GoListToOffenderToItem implements TreeModel { public Object getRoot ( ) { <START_BUG> throw new Error ( "getRoot<seq2seq4repair_space>should<seq2seq4repair_space>never<seq2seq4repair_space>be<seq2seq4repair_space>called" ) ; <END_BUG> } public void setRoot ( Object r ) { } public Object getChild ( Object parent , int index ) { } public int getChildCount ( Object parent ) { } public int getIndexOfChild ( Object parent , Object child ) { } public boolean isLeaf ( Object node ) { } public Vector getChildren ( Object parent ) { } public void valueForPathChanged ( TreePath path , Object newValue ) { } public void addTreeModelListener ( TreeModelListener l ) { } public void removeTreeModelListener ( TreeModelListener l ) { } }

Fix:
throw new UnsupportedOperationException ( "getRoot<seq2seq4repair_space>should<seq2seq4repair_space>never<seq2seq4repair_space>be<seq2seq4repair_space>called" ) ;
Buggy code:
public class EditPhoneActivity extends AppCompatActivity { private static final String TAG = EditPhoneActivity . class . getSimpleName ( ) ; private Toolbar mToolbar ; private EditText inputPhone ; private SessionManager session ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { switch ( item . getItemId ( ) ) { case id . home : <START_BUG> NavUtils . navigateUpFromSameTask ( this ) ; <END_BUG> return true ; case R . id . action_done : final String newPhone = inputPhone . getText ( ) . toString ( ) . trim ( ) ; if ( ! ( Validator . isValidPhone ( newPhone ) ) ) { Toast . makeText ( getApplicationContext ( ) , "Phone<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>Valid" , LENGTH_LONG ) . show ( ) ; } else { SurveriorRequest req = new SurveriorRequest ( Method . POST , AppConfig . URL_UPDATE , session , new Response . Listener < String > ( ) { @ Override public void onResponse ( String response ) { try { JSONObject jObj = new JSONObject ( response ) ; Log . d ( EditPhoneActivity . TAG , ( "response:<seq2seq4repair_space>" + response ) ) ; session . remove ( "INCOMPLETE_DATA" ) ; Toast . makeText ( getApplicationContext ( ) , "Phone<seq2seq4repair_space>updated" , Toast . LENGTH_LONG ) . show ( ) ; Intent intent = new Intent ( EditPhoneActivity . this , . class ) ; startActivity ( intent ) ; finish ( ) ; } catch ( e ) { Log . d ( EditPhoneActivity . TAG , e . getMessage ( ) ) ; } } } , new Response . ErrorListener ( ) { @ Override public void onErrorResponse ( VolleyError error ) { } } ) { @ Override protected Map < String , String > getParams ( ) { Map < String , String > params = new HashMap < > ( ) ; params . put ( "phone_number" , newPhone ) ; return params ; } } ; AppController . getInstance ( ) . addToRequestQueue ( req , "update_user" ) ; } return true ; default : return super . onOptionsItemSelected ( item ) ; } } }

Fix:
onBackPressed ( ) ;
Buggy code:
public class nsID { public int m0 ; public short m1 ; public short m2 ; public byte [ ] m3 = new byte [ 8 ] ; public static final int sizeof = 16 ; public nsID ( ) { } public nsID ( String id ) { } public boolean Equals ( nsID other ) { int ptr = XPCOM . nsID_new ( ) ; XPCOM . memmove ( ptr , this , nsID . sizeof ) ; int otherPtr = XPCOM . nsID_new ( ) ; XPCOM . memmove ( otherPtr , other , nsID . sizeof ) ; <START_BUG> boolean result = XPCOM . nsID_Equals ( ptr , otherPtr ) ; <END_BUG> XPCOM . nsID_delete ( ptr ) ; XPCOM . nsID_delete ( otherPtr ) ; return result ; } public void Parse ( String aIDStr ) { } }

Fix:
boolean result = ( XPCOM . nsID_Equals ( ptr , otherPtr ) ) != 0 ;
Buggy code:
public class ActivateVirtualFolderCommand extends Command { public ActivateVirtualFolderCommand ( ICommandReference reference ) { } public void execute ( IWorkerStatusController worker ) throws Exception { } public static void activateAll ( IMailFolder root ) { FolderChildrenIterator it = new FolderChildrenIterator ( root ) ; List vfolderList = new ArrayList ( ) ; while ( it . hasMoreChildren ( ) ) { IMailFolder f = it . nextChild ( ) ; <START_BUG> if ( f instanceof VirtualFolder ) { <END_BUG> CommandProcessor . getInstance ( ) . addOp ( new ActivateVirtualFolderCommand ( new org . columba . mail . command . MailFolderCommandReference ( f ) ) ) ; } } } }

Fix:
if ( ( ( f instanceof VirtualFolder ) && ( ( f . getUid ( ) ) != 106 ) ) && ( ( ( ( IMailFolder ) ( f . getParent ( ) ) ) . getUid ( ) ) != 106 ) ) {
Buggy code:
<START_BUG> public class ConfirmEmailRule extends SameValueContexualRule < ConfirmEmail , Email , String > { <END_BUG> protected ConfirmEmailRule ( final ValidationContext validationContext , final ConfirmEmail confirmEmail ) { } @ Override public boolean isValid ( final String confirmValue ) { return super . isValid ( confirmValue ) ; } }

Fix:
public class ConfirmEmailRule extends SameValueContextualRule < ConfirmEmail , Email , String > {
Buggy code:
public class CommandParser { private StringBuilder _feedback ; private String _taskName ; private String _userName ; private String _filePath ; private int _taskNumber ; private ActionType _actionType ; private LinkedList < Field > _fields ; private Boolean _completeYesNo ; private boolean _all ; private static final String [ ] [ ] CONVERSION_TABLE = new String [ ] [ ] { new String [ ] { "name" , "-n" } , new String [ ] { "from" , "-s" } , new String [ ] { "start" , "-s" } , new String [ ] { "to" , "-d" } , new String [ ] { "due" , "-d" } , new String [ ] { "by" , "-d" } , new String [ ] { "end" , "-d" } , new String [ ] { "priority" , "-p" } , new String [ ] { "prio" , "-p" } , new String [ ] { "remind" , "-r" } , new String [ ] { "overdue" , "-o" } , new String [ ] { "completed" , "-c" } , new String [ ] { "duration" , "-l" } , new String [ ] { "ascend" , "a" } , new String [ ] { "descend" , "d" } , new String [ ] { "high" , "h" } , new String [ ] { "medium" , "m" } , new String [ ] { "low" , "l" } , new String [ ] { "yes" , "y" } , new String [ ] { "no" , "n" } , new String [ ] { "before" , "bf" } , new String [ ] { "after" , "af" } , new String [ ] { "on" , "on" } , new String [ ] { "between" , "btw" } , new String [ ] { "and" , "&" } , new String [ ] { "today" , "tdy" } , new String [ ] { "tomorrow" , "tmr" } } ; public CommandParser ( String command ) { } public StringBuilder getFeedback ( ) { } public Action getAction ( ) { } public LinkedList < Field > getFields ( ) { } private void processCmdString ( String cmdString ) { } private String convertToPrim ( String cmdString ) { } private void extractTaskNumber ( String fieldsString ) { } private void extractTaskName ( String fieldsString ) { } private void extractTaskNameWithQuotes ( String fieldsString ) { } private void determineActionType ( String actionString ) { } private void determineActionDetails ( String fieldsString ) { } private void determineFields ( String fieldsString ) { } private void determineNonFieldInputs ( String fieldsString ) { } private String removeWrongInputs ( String fieldsString ) { if ( ( ( ( ( ( ( fieldsString . charAt ( 0 ) ) != '-' ) && ( ! ( fieldsString . equalsIgnoreCase ( "all" ) ) ) ) && ( ! ( fieldsString . equalsIgnoreCase ( "y" ) ) ) ) && ( ! ( fieldsString . equalsIgnoreCase ( "n" ) ) ) ) && ( ( _actionType ) != ( ActionType . PUSH ) ) ) && ( ( _actionType ) != ( ActionType . PULL ) ) ) { int indexDash = fieldsString . indexOf ( '-' ) ; String wrongFields ; if ( indexDash != ( - 1 ) ) { wrongFields = fieldsString . substring ( 0 , fieldsString . indexOf ( '-' ) ) ; } else { wrongFields = fieldsString ; } _feedback . append ( ( ( "Invalid<seq2seq4repair_space>field<seq2seq4repair_space>format<seq2seq4repair_space>in<seq2seq4repair_space>\"" + wrongFields ) + "\".<seq2seq4repair_space>" ) ) ; <START_BUG> fieldsString = fieldsString . replaceFirst ( wrongFields , "" ) ; <END_BUG> } return fieldsString ; } public static void main ( String [ ] args ) { } }

Fix:
fieldsString = fieldsString . replaceFirst ( Pattern . quote ( wrongFields ) , "" ) ;
Buggy code:
public class MiruAdminRegion implements MiruPageRegion < Void > { private final String template ; private final MiruSoyRenderer renderer ; private final IngressEndpointStats endpointStats ; public MiruAdminRegion ( String template , MiruSoyRenderer renderer , IngressEndpointStats endpointStats ) { } @ Override public String render ( Void input ) { Map < String , Object > data = Maps . newHashMap ( ) ; List < Map < String , String > > rows = new ArrayList < > ( ) ; long grandTotal = 0 ; Map < MiruTenantId , AtomicLong > ingressedMap = endpointStats . ingressedMap ( ) ; for ( Map . Entry < MiruTenantId , AtomicLong > e : ingressedMap . entrySet ( ) ) { Map < String , String > status = new HashMap < > ( ) ; status . put ( "tenantId" , e . getKey ( ) . toString ( ) ) ; status . put ( "ingressed" , String . valueOf ( e . getValue ( ) . get ( ) ) ) ; rows . add ( status ) ; grandTotal += e . getValue ( ) . get ( ) ; } <START_BUG> data . put ( "ingressedTotal" , grandTotal ) ; <END_BUG> data . put ( "ingressedStatus" , rows ) ; return renderer . render ( template , data ) ; } @ Override public String getTitle ( ) { } }

Fix:
data . put ( "ingressedTotal" , String . valueOf ( grandTotal ) ) ;
Buggy code:
public final class Step1MapperTest extends MahoutTestCase { private static class MockTreeBuilder implements TreeBuilder { private Data expected ; public void setExpected ( Data data ) { } @ Override public Node build ( Random rng , Data data ) { for ( int index = 0 ; index < ( data . size ( ) ) ; index ++ ) { assertTrue ( expected . contains ( data . get ( index ) ) ) ; } <START_BUG> return new Leaf ( ( - 1 ) ) ; <END_BUG> } } private static class MockStep1Mapper extends Step1Mapper { private MockStep1Mapper ( TreeBuilder treeBuilder , Dataset dataset , Long seed , int partition , int numMapTasks , int numTrees ) { } } private static class TreeIDCapture extends Capture < TreeID > { private TreeIDCapture ( ) { } @ Override public void setValue ( final TreeID value ) { } } static final int NUM_ATTRIBUTES = 4 ; static final int NUM_INSTANCES = 100 ; static final int NUM_TREES = 10 ; static final int NUM_MAPPERS = 2 ; @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) @ Test public void testMapper ( ) throws Exception { } }

Fix:
return new Leaf ( Double . NaN ) ;
Buggy code:
public class IterativeAutomatonBuilder extends ScenarioAndLtlAutomatonBuilder { private static Pair < Optional < Automaton > , List < Assignment > > automatonFromFormula ( BooleanFormula bf , Logger logger , String solverParams , int timeoutSeconds , ScenariosTree tree , int colorSize ) throws IOException { deleteTrash ( ) ; try ( PrintWriter pw = new PrintWriter ( "_tmp.pretty" ) ) { pw . print ( bf . toString ( ) ) ; } <START_BUG> final String strBf = bf . toLimbooleString ( ) ; <END_BUG> final Pair < List < Assignment > , Long > solution = BooleanFormula . solveAsSat ( strBf , logger , solverParams , timeoutSeconds ) ; final List < Assignment > list = solution . getLeft ( ) ; final long time = solution . getRight ( ) ; final SolverResult ass = ( list . isEmpty ( ) ) ? new SolverResult ( ( time >= ( timeoutSeconds * 1000 ) ? SolverResults . UNKNOWN : SolverResults . UNSAT ) , ( ( int ) ( time ) ) ) : new SolverResult ( list , ( ( int ) ( time ) ) ) ; logger . info ( ass . toString ( ) . split ( "\n" ) [ 0 ] ) ; return Pair . of ( ( ( ass . type ( ) ) != ( SolverResults . SAT ) ? Optional . empty ( ) : constructAutomatonFromAssignment ( logger , ass , tree , colorSize ) ) , list ) ; } public static Optional < Automaton > build ( Logger logger , ScenariosTree tree , int colorSize , String solverParams , boolean complete , int timeoutSeconds , String resultFilePath , String ltlFilePath , List < LtlNode > formulae , boolean bfsConstraints ) throws IOException { } }

Fix:
final String strBf = bf . simplify ( ) . toLimbooleString ( ) ;
Buggy code:
public class JavaUnicodeEscaper extends UnicodeEscaper { public static JavaUnicodeEscaper above ( final int codepoint ) { } public static JavaUnicodeEscaper below ( final int codepoint ) { } public static JavaUnicodeEscaper between ( final int codepointLow , final int codepointHigh ) { } public static JavaUnicodeEscaper outsideOf ( final int codepointLow , final int codepointHigh ) { } public JavaUnicodeEscaper ( final int below , final int above , final boolean between ) { } @ Override protected String toUtf16Escape ( final int codepoint ) { <START_BUG> char [ ] surrogatePair = Character . toChars ( codepoint ) ; <END_BUG> return ( ( "\\u" + ( CharSequenceTranslator . hex ( surrogatePair [ 0 ] ) ) ) + "\\u" ) + ( CharSequenceTranslator . hex ( surrogatePair [ 1 ] ) ) ; } }

Fix:
final char [ ] surrogatePair = Character . toChars ( codepoint ) ;
Buggy code:
@ WebServlet ( name = "RunRmiServlet" , urlPatterns = { "//RunRmiServlet" } ) public class RunRmiServlet extends HttpServlet { private List < Context > contexts = new ArrayList < Context > ( ) ; protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } protected MyObject lookup ( ) throws ServletException { try { Properties env = new Properties ( ) ; String address = System . getProperty ( "node0" , "localhost" ) ; address = NetworkUtils . formatPossibleIpv6Address ( address ) ; <START_BUG> env . put ( Context . PROVIDER_URL , ( ( "http-remoting:////" + address ) + ":8080" ) ) ; <END_BUG> env . put ( Context . INITIAL_CONTEXT_FACTORY , "org.jboss.naming.remote.client.InitialContextFactory" ) ; Context ctx = new InitialContext ( env ) ; try { return ( ( MyObject ) ( ctx . lookup ( "loc//stub" ) ) ) ; } finally { contexts . add ( ctx ) ; } } catch ( NamingException e ) { throw new ServletException ( e ) ; } } public void destroy ( ) { } }

Fix:
env . put ( Context . PROVIDER_URL , ( ( "remote:////" + address ) + ":4447" ) ) ;
Buggy code:
public class PersonalInformationManagerGUI { static final String APPOINTEMENTSTAB = "Appointments" ; static final String CONTACTSTAB = "Contacts" ; static final String UNIVERSITYRESOURCESTAB = "University<seq2seq4repair_space>Resources" ; static final String NOTESTAB = "Notes" ; static DataBaseConnection dataBaseConncetion = new DataBaseConnection ( ) ; public static void main ( String [ ] args ) { } public void addComponentToPane ( Container pane ) { } private static void createAndShowGUI ( ) { } public void buildContactsPanel ( JTabbedPane tabbedPane ) { } public void buildAppointmentsPanel ( JTabbedPane tabbedPane ) { JPanel appointmentsPanel = new JPanel ( ) ; try { ResultSet results = PersonalInformationManagerGUI . dataBaseConncetion . getTableData ( "APPOINTMENTS" ) ; while ( results . next ( ) ) { appointmentsPanel . add ( new JLabel ( "Appointment:<seq2seq4repair_space>" ) ) ; appointmentsPanel . add ( new JTextField ( results . getString ( "APPOINTMENT_TITLE" ) ) ) ; appointmentsPanel . add ( new JLabel ( "Category:<seq2seq4repair_space>" ) ) ; appointmentsPanel . add ( new JTextField ( results . getString ( "APPOINTMENT_CATEGORY" ) ) ) ; appointmentsPanel . add ( new JLabel ( "Description:<seq2seq4repair_space>" ) ) ; appointmentsPanel . add ( new JTextField ( results . getString ( "APPOINTMENT_DESCRIPTION" ) ) ) ; appointmentsPanel . add ( new JLabel ( "Location:<seq2seq4repair_space>" ) ) ; appointmentsPanel . add ( new JTextField ( results . getString ( "APPOINTMENT_LOCATION" ) ) ) ; } tabbedPane . addTab ( PersonalInformationManagerGUI . APPOINTEMENTSTAB , appointmentsPanel ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } JScrollPane appointmentPane = new JScrollPane ( appointmentsPanel ) ; appointmentPane . setHorizontalScrollBarPolicy ( JScrollPane . HORIZONTAL_SCROLLBAR_AS_NEEDED ) ; appointmentPane . setVerticalScrollBarPolicy ( JScrollPane . VERTICAL_SCROLLBAR_AS_NEEDED ) ; appointmentPane . setBounds ( 50 , 30 , 300 , 50 ) ; <START_BUG> tabbedPane . addTab ( PersonalInformationManagerGUI . NOTESTAB , appointmentPane ) ; <END_BUG> } public void buildNotesPanel ( JTabbedPane tabbedPane ) { } public void buildUniversityResourcesPanel ( JTabbedPane tabbedPane ) { } No newline ; at end ; of file ; }

Fix:
tabbedPane . addTab ( PersonalInformationManagerGUI . APPOINTEMENTSTAB , appointmentPane ) ;
Buggy code:
public class ModClusterRemoveProxy implements OperationStepHandler , DescriptionProvider { static final ModClusterRemoveProxy INSTANCE = new ModClusterRemoveProxy ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( context . getProcessType ( ) . isServer ( ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "remove-proxy:<seq2seq4repair_space>%s" , operation ) ; Proxy proxy = new Proxy ( operation ) ; modcluster . removeProxy ( proxy . host , proxy . port ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . isNormalServer ( ) ) {
Buggy code:
@ ParametersAreNonnullByDefault public final class MatchResult { private final String label ; private final boolean success ; private final InputBuffer buffer ; private final Node < ? > parsingNode ; MatchResult ( final String label , final boolean success , final InputBuffer buffer , @ Nullable final Node < ? > parsingNode ) { } public boolean isSuccess ( ) { } public String getLabel ( ) { } @ Nonnull @ Override public String toString ( ) { if ( ( parsingNode ) == null ) return "no<seq2seq4repair_space>information<seq2seq4repair_space>available" ; final int start = parsingNode . getStartIndex ( ) ; final Position pos = buffer . getPosition ( start ) ; final int line = pos . getLine ( ) ; final int column = pos . getColumn ( ) ; final StringBuilder sb = new StringBuilder ( "Match<seq2seq4repair_space>information:\n" ) ; sb . append ( "Matcher:<seq2seq4repair_space>" ) . append ( parsingNode . getMatcher ( ) ) ; <START_BUG> sb . append ( "\nStarting<seq2seq4repair_space>position:<seq2seq4repair_space>line<seq2seq4repair_space>" ) . append ( line ) . append ( ",<seq2seq4repair_space>column<seq2seq4repair_space>" ) . append ( column ) . append ( "\n----\n" ) . append ( buffer . extractLine ( line ) ) . append ( '\n' ) . append ( Strings . repeat ( "<seq2seq4repair_space>" , column ) ) . append ( "^\n----\n" ) ; <END_BUG> if ( success ) { sb . append ( "Match<seq2seq4repair_space>SUCCESS;<seq2seq4repair_space>text<seq2seq4repair_space>matched:\n<" ) . append ( buffer . extract ( start , parsingNode . getEndIndex ( ) ) ) . append ( '>' ) ; } else { sb . append ( "Match<seq2seq4repair_space>FAILED" ) ; } return sb . toString ( ) ; } }

Fix:
sb . append ( "\nStarting<seq2seq4repair_space>position:<seq2seq4repair_space>line<seq2seq4repair_space>" ) . append ( line ) . append ( ",<seq2seq4repair_space>column<seq2seq4repair_space>" ) . append ( column ) . append ( "\n----\n" ) . append ( buffer . extractLine ( line ) ) . append ( '\n' ) . append ( Strings . repeat ( "<seq2seq4repair_space>" , ( column - 1 ) ) ) . append ( "^\n----\n" ) ;
Buggy code:
public class WebMarkupContainerWithAssociatedMarkup extends WebMarkupContainer { private static final long serialVersionUID = 1L ; private boolean checkedBody = false ; public WebMarkupContainerWithAssociatedMarkup ( final String id ) { } public WebMarkupContainerWithAssociatedMarkup ( final String id , IModel model ) { } protected final void renderHeadFromAssociatedMarkupFile ( final HtmlHeaderContainer container ) { } private void checkBodyOnLoad ( ) { } private final WebMarkupContainerWithAssociatedMarkup . HeaderPartContainer getHeaderPart ( ) { final MarkupStream associatedMarkupStream = getApplication ( ) . getMarkupCache ( ) . getMarkupStream ( this , false ) ; if ( associatedMarkupStream == null ) { return null ; } int index = Markup . NO_HEADER_FOUND ; if ( ( associatedMarkupStream . getHeaderIndex ( ) ) != ( Markup . NO_HEADER_FOUND ) ) { index = associatedMarkupStream . getHeaderIndex ( ) ; } if ( index != ( Markup . NO_HEADER_FOUND ) ) { associatedMarkupStream . setCurrentIndex ( index ) ; final MarkupElement element = associatedMarkupStream . get ( ) ; if ( element instanceof WicketTag ) { final WicketTag wTag = ( ( WicketTag ) ( element ) ) ; if ( ( ( wTag . isHeadTag ( ) ) == true ) && ( ( wTag . getNamespace ( ) ) != null ) ) { <START_BUG> final String headerId = ( ( "_" + ( Classes . name ( this . getClass ( ) ) ) ) + ( this . getVariation ( ) ) ) + "Header" ; <END_BUG> WebMarkupContainerWithAssociatedMarkup . HeaderPartContainer headerContainer = new WebMarkupContainerWithAssociatedMarkup . HeaderPartContainer ( headerId , this , wTag . getAttributes ( ) . getString ( ( ( associatedMarkupStream . getWicketNamespace ( ) ) + ":scope" ) ) ) ; headerContainer . setMarkupStream ( associatedMarkupStream ) ; headerContainer . setRenderBodyOnly ( true ) ; return headerContainer ; } } } return null ; } private static final class HeaderPartContainer extends WebMarkupContainerWithAssociatedMarkup implements IComponentResolver { private static final long serialVersionUID = 1L ; private final MarkupContainer container ; private final String scope ; public HeaderPartContainer ( final String id , final MarkupContainer container , final String scope ) { } public final String getScope ( ) { } public boolean isTransparentResolver ( ) { } public final boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { } } }

Fix:
final String headerId = ( ( "_" + ( Classes . simpleName ( this . getClass ( ) ) ) ) + ( this . getVariation ( ) ) ) + "Header" ;
Buggy code:
public class SymbolContainerTestDataFactory { private SymbolContainerTestDataFactory ( ) { } public static SymbolContainer createSymbolContainer ( MusicalKey key , MusicalInstrument instrument ) { } public static SymbolContainer createSymbolContainer ( MusicalKey key ) { } public static SymbolContainer createSymbolContainer ( MusicalInstrument instrument ) { } public static SymbolContainer createSymbolContainer ( ) { } public static SymbolContainer createSimpleSymbolContainer ( ) { } public static SymbolContainer createSymbolContainerWithOneNoteSymbol ( NoteName noteName ) { } public static SymbolContainer createSymbolsWithBreak ( ) { SymbolContainer symbolContainer = SymbolContainerTestDataFactory . createSymbolContainer ( ) ; <START_BUG> symbolContainer . add ( NoteSymbolTestDataFactory . createNoteSymbol ( QUARTER , C4 ) ) ; <END_BUG> symbolContainer . add ( NoteSymbolTestDataFactory . createNoteSymbol ( QUARTER , E4 ) ) ; symbolContainer . add ( BreakSymbolTestDataFactory . createBreakSymbol ( QUARTER ) ) ; symbolContainer . add ( NoteSymbolTestDataFactory . createNoteSymbol ( QUARTER , C4 ) ) ; return symbolContainer ; } public static SymbolContainer createSymbolsWithSeveralBreaks ( ) { } public static SymbolContainer createSymbolsWithBreakAtTheEnd ( ) { } }

Fix:
symbolContainer . add ( NoteSymbolTestDataFactory . createNoteSymbol ( QUARTER , C4 , D4 ) ) ;
Buggy code:
public class YacunaAdapterTest { @ Test public void testTickerAdapter ( ) throws IOException { InputStream is = YacunaAdapterTest . class . getResourceAsStream ( "//example-ticker-data.json" ) ; ObjectMapper mapper = new ObjectMapper ( ) ; TypeFactory t = TypeFactory . defaultInstance ( ) ; YacunaTickerReturn tickerReturn = mapper . readValue ( is , YacunaTickerReturn . class ) ; <START_BUG> Ticker ticker = YacunaAdapters . adaptTicker ( tickerReturn . getTickerList ( ) . get ( 0 ) , new CurrencyPair ( "EUR" , "XBT" ) ) ; <END_BUG> assertThat ( ticker . getHigh ( ) ) . isEqualTo ( new BigDecimal ( "279.00" ) ) ; assertThat ( ticker . getLow ( ) ) . isEqualTo ( new BigDecimal ( "273.04" ) ) ; assertThat ( ticker . getLast ( ) ) . isEqualTo ( new BigDecimal ( "279.00" ) ) ; assertThat ( ticker . getVolume ( ) ) . isEqualTo ( new BigDecimal ( "1620.34069171" ) ) ; assertThat ( ticker . getAsk ( ) ) . isEqualTo ( new BigDecimal ( "278.00" ) ) ; assertThat ( ticker . getBid ( ) ) . isEqualTo ( new BigDecimal ( "275.00" ) ) ; } }

Fix:
Ticker ticker = YacunaAdapters . adaptTicker ( tickerReturn . getTickerList ( ) . get ( 0 ) , new CurrencyPair ( "XBT" , "EUR" ) ) ;
Buggy code:
public class IDREFDV extends TypeValidator { public short getAllowedFacets ( ) { } public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { if ( ! ( XMLChar . isValidNCName ( content ) ) ) { <START_BUG> throw new InvalidDatatypeValueException ( ( ( "Value<seq2seq4repair_space>'" + content ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>ID" ) ) ; <END_BUG> } return content ; } public void checkExtraRules ( Object value , ValidationContext context ) throws InvalidDatatypeValueException { } }

Fix:
throw new InvalidDatatypeValueException ( "cvc-datatype-valid.1.2.1" , new Object [ ] { content , "NCName" } ) ;