nus-yam/ex-repair huggingface dataset:
Buggy code:
public class StreamParserTests { @ Rule public ExpectedException thrown = ExpectedException . none ( ) ; private StreamNode sn ; @ Test public void oneModule ( ) { } @ Test public void hyphenatedModuleName ( ) { } @ Test public void streamNaming ( ) { } @ Test public void testInvalidStreamName ( ) { } @ Test public void twoModules ( ) { } @ Test public void moduleLabels ( ) { } @ Test public void moduleLabels3 ( ) { } @ Test public void oneModuleWithParam ( ) { } @ Test public void oneModuleWithTwoParams ( ) { } @ Test public void testParameters ( ) { } @ Test public void testInvalidModules ( ) { } @ Test public void tapWithLabelReference ( ) { } @ Test public void tapWithQualifiedModuleReference ( ) { } @ Test public void expressions_xd159 ( ) { } @ Test public void expressions_xd159_2 ( ) { } @ Test public void ensureStreamNamesValid_xd1344 ( ) { } @ Test public void expressions_xd159_3 ( ) { } @ Test public void moduleArguments_xd1613 ( ) { } @ Test public void expressions_xd159_4 ( ) { } @ Test public void expressions_gh1 ( ) { } @ Test public void expressions_gh1_2 ( ) { } @ Test public void sourceChannel ( ) { } @ Test public void sinkChannel ( ) { } @ Test public void channelVariants ( ) { } @ Test public void sourceChannel2 ( ) { } @ Test public void sourceTapChannel ( ) { } @ Test public void nameSpaceTestWithSpaces ( ) { } @ Test public void errorCases01 ( ) { } @ Test public void errorCases04 ( ) { } @ Test public void errorCases05 ( ) { } @ Test public void errorCases06 ( ) { } @ Test public void errorCases07 ( ) { <START_BUG> checkForParseError ( "foo<seq2seq4repair_space>><seq2seq4repair_space>bar" , UNEXPECTED_DATA_AFTER_STREAMDEF , 6 , "bar" ) ; <END_BUG> checkForParseError ( ":foo<seq2seq4repair_space>>" , OOD , 6 ) ; checkForParseError ( ":foo<seq2seq4repair_space>><seq2seq4repair_space>--2323" , EXPECTED_MODULENAME , 7 , "--" ) ; checkForParseError ( ":foo<seq2seq4repair_space>><seq2seq4repair_space>*" , UNEXPECTED_DATA , 7 , "*" ) ; } @ Test public void errorCases08 ( ) { } @ Test public void errorCases09 ( ) { } @ Test public void duplicateExplicitLabels ( ) { } @ Test public void addingALabelLiftsAmbiguity ( ) { } @ Test public void duplicateImplicitLabels ( ) { } @ Test public void tapWithLabels ( ) { } @ Test public void bridge01 ( ) { } @ Test public void needAdjacentTokensForParameters ( ) { } @ Test public void testComposedOptionNameErros ( ) { } @ Test public void testXD2416 ( ) { } StreamNode parse ( String streamDefinition ) { } StreamNode parse ( String streamName , String streamDefinition ) { } private void checkForIllegalStreamName ( String streamName , String streamDef ) { } private void checkForParseError ( String stream , DSLMessage msg , int pos , Object ... inserts ) { } private void checkForParseError ( String name , String stream , DSLMessage msg , int pos , String ... inserts ) { } }

Fix:
checkForParseError ( "foo<seq2seq4repair_space>><seq2seq4repair_space>bar" , EXPECTED_CHANNEL_PREFIX , 6 , "bar" ) ;
Buggy code:
public abstract class PacketUtils { public static byte [ ] extractDstMac ( byte [ ] payload ) { } public static byte [ ] extractSrcMac ( byte [ ] payload ) { } public static byte [ ] extractEtherType ( byte [ ] payload ) { } public static MacAddress rawMacToMac ( byte [ ] rawMac ) { } public static NodeConnectorRef createNodeConnRef ( InstanceIdentifier < Node > nodeInstId , NodeKey nodeKey , String port ) { StringBuilder sBuild = new StringBuilder ( nodeKey . getId ( ) . getValue ( ) ) . append ( ":" ) . append ( port ) ; NodeConnectorKey nConKey = new NodeConnectorKey ( new NodeConnectorId ( sBuild . toString ( ) ) ) ; <START_BUG> InstanceIdentifier < NodeConnector > portPath = InstanceIdentifier . builder ( nodeInstId ) . child ( NodeConnector . class , nConKey ) . toInstance ( ) ; <END_BUG> return new NodeConnectorRef ( portPath ) ; } }

Fix:
InstanceIdentifier < NodeConnector > portPath = InstanceIdentifier . builder ( nodeInstId ) . child ( NodeConnector . class , nConKey ) . build ( ) ;
Buggy code:
public class ProgressCircle extends View { protected Paint mPaint ; protected RectF mRectF ; protected Rect mRect ; protected long mProgress ; protected long mMax ; protected boolean mHollow ; protected float mPadding ; protected float mStrokeWidth ; protected int mColor ; public ProgressCircle ( Context context , AttributeSet attrs , int defStyle ) { } public ProgressCircle ( Context context , AttributeSet attrs ) { } public ProgressCircle ( Context context ) { } protected void setup ( Context context , AttributeSet attrs , int strokeWidth ) { } public void setMax ( long max ) { } public long getMax ( ) { } public void setHollow ( boolean hollow ) { } public boolean getHollow ( ) { } public void setProgress ( long progress ) { } @ Override protected void onDraw ( Canvas canvas ) { getDrawingRect ( mRect ) ; mRect . left += ( getPaddingLeft ( ) ) + ( mPadding ) ; mRect . top += ( getPaddingTop ( ) ) + ( mPadding ) ; mRect . right -= ( getPaddingRight ( ) ) + ( mPadding ) ; mRect . bottom -= ( getPaddingBottom ( ) ) + ( mPadding ) ; mRectF . set ( mRect ) ; mPaint . setAntiAlias ( true ) ; mPaint . setStrokeCap ( BUTT ) ; mPaint . setColor ( mColor ) ; <START_BUG> canvas . drawArc ( mRectF , ( - 60 ) , ( ( mProgress ) < 0 ? ( getMax ( ) ) - 60 : ( ( mProgress ) * 300 ) // ( getMax ( ) ) ) , ( ! ( mHollow ) ) , mPaint ) ; <END_BUG> } public void setColor ( int color ) { } No newline ; at end ; of file ; }

Fix:
canvas . drawArc ( mRectF , ( - 60 ) , ( ( mProgress ) < 0 ? 300 : ( ( mProgress ) * 300 ) // ( getMax ( ) ) ) , ( ! ( mHollow ) ) , mPaint ) ;
Buggy code:
@ Controller public class LoginController { @ Autowired private ICredentialsService credentialsService ; @ Autowired private IUserService userService ; @ RequestMapping ( "//login.do" ) public String login ( @ ModelAttribute Credentials credentials , HttpServletRequest request , ModelMap model , BindingResult result ) { Integer credentialsId = credentialsService . find ( credentials ) ; if ( credentialsId == ( - 1 ) ) { model . put ( "error" , "Пользователя<seq2seq4repair_space>с<seq2seq4repair_space>такими<seq2seq4repair_space>данными<seq2seq4repair_space>не<seq2seq4repair_space>существует!" ) ; return "login" ; } else { User currentUser = userService . getByCredentials ( credentialsId ) ; request . getSession ( ) . setAttribute ( "user" , currentUser ) ; } <START_BUG> return "dashboard" ; <END_BUG> } @ RequestMapping ( "//register-me.do" ) public ModelAndView sendToRegistration ( ) { } }

Fix:
return "redirect://dashboard.do" ;
Buggy code:
public abstract class TreeListViewAdapter < T > extends BaseAdapter { protected Context mContext ; protected List < Node > mNodes ; protected LayoutInflater mInflater ; protected List < Node > mAllNodes ; private TreeListViewAdapter . OnTreeNodeClickListener onTreeNodeClickListener ; public interface OnTreeNodeClickListener { void onClick ( Node node , int position ) { } } public void setOnTreeNodeClickListener ( TreeListViewAdapter . OnTreeNodeClickListener onTreeNodeClickListener ) { } public TreeListViewAdapter ( ListView mTree , Context context , List < T > datas , int defaultExpandLevel ) throws IllegalAccessException , IllegalArgumentException { } public void expandOrCollapse ( int position ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { Node node = mNodes . get ( position ) ; convertView = getConvertView ( node , position , convertView , parent ) ; <START_BUG> convertView . setPadding ( 30 , 3 , 3 , 3 ) ; <END_BUG> return convertView ; } public abstract View getConvertView ( Node node , int position , View convertView , ViewGroup parent ) { } }

Fix:
convertView . setPadding ( 30 , 0 , 0 , 0 ) ;
Buggy code:
public class AIProcreate extends AbstractAI { private WatchedBoolean isProcreating ; private boolean hasHadTwins ; private int procreateTicks ; public AIProcreate ( EntityHuman owner ) { } @ Override public void onUpdateCommon ( ) { } @ Override public void onUpdateClient ( ) { } @ Override public void onUpdateServer ( ) { if ( isProcreating . getBoolean ( ) ) { ( procreateTicks ) ++ ; if ( ( procreateTicks ) >= ( ( Time . SECOND ) * 3 ) ) { isProcreating . setValue ( false ) ; procreateTicks = 0 ; owner . playSound ( "mob.chicken.plop" , 1.0F , 1.0F ) ; final EntityPlayer playerSpouse = owner . getPlayerSpouse ( ) ; if ( playerSpouse != null ) { PlayerData data = MCA . getPlayerData ( playerSpouse ) ; data . shouldHaveBaby . setValue ( true ) ; boolean isMale = new Random ( ) . nextBoolean ( ) ; ItemStack stack = new ItemStack ( ( isMale ? ModItems . babyBoy : ModItems . babyGirl ) ) ; if ( ! ( playerSpouse . inventory . addItemStackToInventory ( stack ) ) ) { <START_BUG> playerSpouse . inventory . addItemStackToInventory ( stack ) ; <END_BUG> } Achievement achievement = ( isMale ) ? ModAchievements . babyBoy : ModAchievements . babyGirl ; playerSpouse . triggerAchievement ( achievement ) ; MCA . getPacketHandler ( ) . sendPacketToPlayer ( new PacketOpenBabyNameGUI ( isMale ) , ( ( EntityPlayerMP ) ( playerSpouse ) ) ) ; } } } } @ Override public void reset ( ) { } @ Override public void writeToNBT ( NBTTagCompound nbt ) { } @ Override public void readFromNBT ( NBTTagCompound nbt ) { } public void setIsProcreating ( boolean value ) { } public boolean getHasHadTwins ( ) { } public void setHasHadTwins ( boolean value ) { } }

Fix:
owner . getInventory ( ) . addItemStackToInventory ( stack ) ;
Buggy code:
public class ResoluteEvaluator extends ResoluteSwitch < ResoluteValue > { protected final Deque < Map < NamedElement , ResoluteValue > > varStack = new LinkedList < > ( ) ; protected final EvaluationContext context ; private static final BoolValue TRUE = new BoolValue ( true ) ; private static final BoolValue FALSE = new BoolValue ( false ) ; public ResoluteEvaluator ( EvaluationContext context , Map < NamedElement , ResoluteValue > env ) { } public EvaluationContext getEvaluationContext ( ) { } @ Override public ResoluteValue caseFailExpr ( FailExpr object ) { <START_BUG> if ( ( object . getVal ( ) ) != null ) { <END_BUG> return ResoluteEvaluator . FALSE ; } else { throw new ResoluteFailException ( "Fail<seq2seq4repair_space>Statement<seq2seq4repair_space>Reached" , object ) ; } } @ Override public ResoluteValue caseConstantDefinition ( ConstantDefinition object ) { } @ Override public ResoluteValue caseArg ( Arg object ) { } @ Override public ResoluteValue caseBinaryExpr ( BinaryExpr object ) { } @ Override public ResoluteValue caseUnaryExpr ( UnaryExpr object ) { } @ Override public ResoluteValue caseIdExpr ( IdExpr object ) { } @ Override public ResoluteValue caseThisExpr ( ThisExpr object ) { } public ComponentInstance getInstanceChild ( ComponentInstance instance , NamedElement subcomponent ) { } @ Override public ResoluteValue caseIntExpr ( IntExpr object ) { } @ Override public ResoluteValue caseRealExpr ( RealExpr object ) { } @ Override public ResoluteValue caseBoolExpr ( BoolExpr object ) { } @ Override public ResoluteValue caseStringExpr ( StringExpr object ) { } @ Override public ResoluteValue caseIfThenElseExpr ( IfThenElseExpr object ) { } @ Override public ResoluteValue caseQuantifiedExpr ( QuantifiedExpr object ) { } private ResoluteValue exists ( List < Arg > args , Expr body ) { } private ResoluteValue forall ( List < Arg > args , Expr body ) { } public List < ResoluteValue > getArgSet ( Arg arg ) { } @ Override public ResoluteValue caseFnCallExpr ( FnCallExpr object ) { } private ResoluteValue functionCall ( FnCallExpr object ) { } public static Map < NamedElement , ResoluteValue > pairArguments ( List < Arg > args , List < ResoluteValue > argVals ) { } @ Override public ResoluteValue caseFilterMapExpr ( FilterMapExpr object ) { } private List < ResoluteValue > filterMap ( List < Arg > args , Expr map , Expr filter ) { } private List < ResoluteValue > filter ( Expr map , Expr filter ) { } @ Override public ResoluteValue caseSetExpr ( SetExpr object ) { } @ Override public ResoluteValue caseInstanceOfExpr ( InstanceOfExpr object ) { } @ Override public ResoluteValue caseCastExpr ( CastExpr object ) { } @ Override public ResoluteValue caseLetExpr ( LetExpr object ) { } @ Override public ResoluteValue caseLetBinding ( LetBinding object ) { } @ Override public ResoluteValue caseBuiltInFnCallExpr ( BuiltInFnCallExpr object ) { } private static ResoluteValue bool ( boolean bool ) { } public List < ResoluteValue > doSwitchList ( List < ? extends EObject > list ) { } }

Fix:
if ( ( ( object . getVal ( ) ) != null ) || ( ( object . getFailmsg ( ) ) != null ) ) {
Buggy code:
public class CircularQTest { CircularQueue < Integer > q ; @ BeforeClass public static void setUpBeforeClass ( ) throws Exception { } @ AfterClass public static void tearDownAfterClass ( ) throws Exception { } @ Before public void setUp ( ) throws Exception { } @ After public void tearDown ( ) throws Exception { } @ Test public void testSizeEqual0 ( ) throws Exception { try { <START_BUG> q = new CircularQueue < Integer > ( 10 ) ; <END_BUG> } catch ( Exception e ) { System . out . println ( e ) ; } } @ Test public void testAdd ( ) throws Exception { } @ Test public void testRemove1 ( ) throws Exception { } @ Test public void testRemoveFromEmpty ( ) throws Exception { } @ Test public void testPollEmpty ( ) throws Exception { } @ Test public void testPoll ( ) throws Exception { } @ Test public void testPeek ( ) throws Exception { } @ Test public void testPeekEmptyQueue ( ) throws Exception { } @ Test public void testIsEmpty ( ) throws Exception { } @ Test public void testIsEmptyFalse ( ) throws Exception { } @ Test public void testSize ( ) throws Exception { } @ Test public void testGetCapacity ( ) throws Exception { } @ Test public void testGetRemainingQueueSpace ( ) throws Exception { } @ Test public void testIsQueueFull ( ) throws Exception { } @ Test public void testToArray ( ) throws Exception { } @ Test public void testElement ( ) throws Exception { } @ Test public void testContains ( ) throws Exception { } @ Test public void testContainsAll ( ) throws Exception { } @ Test public void testIterator ( ) throws Exception { } @ Test public void testRemove ( ) throws Exception { } @ Test public void testRemoveAll ( ) throws Exception { } @ Test public void testAddAll ( ) throws Exception { } @ Test public void testRetainAll ( ) throws Exception { } @ Test public void testToArray2 ( ) throws Exception { } }

Fix:
q = new CircularQueue < Integer > ( 0 ) ;
Buggy code:
public class ProofClass { public static void main ( String [ ] args ) { HashMap < Character , ExpresionTree > vars = new HashMap < > ( ) ; String expresion = "34<seq2seq4repair_space>25<seq2seq4repair_space>+<seq2seq4repair_space>3<seq2seq4repair_space>2<seq2seq4repair_space>234<seq2seq4repair_space>^<seq2seq4repair_space>-<seq2seq4repair_space>*" ; char var = 'A' ; ExpresionTree expresionTree = new collection . tree . ExpressionPostFix ( expresion , vars ) ; vars . put ( var , expresionTree ) ; System . out . println ( expresionTree . infix ( ) ) ; System . out . println ( expresionTree . operate ( ) ) ; <START_BUG> String expresion2 = "A<seq2seq4repair_space>34<seq2seq4repair_space>25<seq2seq4repair_space>+<seq2seq4repair_space>3<seq2seq4repair_space>2<seq2seq4repair_space>234<seq2seq4repair_space>^<seq2seq4repair_space>-<seq2seq4repair_space>*<seq2seq4repair_space>-" ; <END_BUG> ExpresionTree expresionTree2 = new collection . tree . ExpressionPostFix ( expresion2 , vars ) ; System . out . println ( expresionTree2 . infix ( ) ) ; System . out . println ( expresionTree2 . operate ( ) ) ; System . exit ( 0 ) ; } }

Fix:
String expresion2 = "a<seq2seq4repair_space>34<seq2seq4repair_space>25<seq2seq4repair_space>+<seq2seq4repair_space>3<seq2seq4repair_space>2<seq2seq4repair_space>234<seq2seq4repair_space>^<seq2seq4repair_space>-<seq2seq4repair_space>*<seq2seq4repair_space>-" ;
Buggy code:
public class XMLLayout extends Layout { public static final String LOCATION_INFO_OPTION = "LocationInfo" ; private final int DEFAULT_SIZE = 256 ; private final int UPPER_LIMIT = 2048 ; private StringBuffer buf = new StringBuffer ( DEFAULT_SIZE ) ; private boolean locationInfo = false ; public String [ ] getOptionStrings ( ) { } public void setOption ( String key , String value ) { } public void setLocationInfo ( boolean flag ) { } public boolean getLocationInfo ( ) { } public void activateOptions ( ) { } public String format ( LoggingEvent event ) { if ( ( buf . capacity ( ) ) > ( UPPER_LIMIT ) ) { buf = new StringBuffer ( DEFAULT_SIZE ) ; } else { buf . setLength ( 0 ) ; } buf . append ( "<log4j:event<seq2seq4repair_space>category=\"" ) ; <START_BUG> buf . append ( event . categoryName ) ; <END_BUG> buf . append ( "\"<seq2seq4repair_space>timestamp=\"" ) ; buf . append ( event . timeStamp ) ; buf . append ( "\"<seq2seq4repair_space>level=\"" ) ; buf . append ( event . level ) ; buf . append ( "\"<seq2seq4repair_space>thread=\"" ) ; buf . append ( event . getThreadName ( ) ) ; buf . append ( "\">\r\n" ) ; buf . append ( "<log4j:message><![CDATA[" ) ; buf . append ( event . getRenderedMessage ( ) ) ; buf . append ( "]]><//log4j:message>\r\n" ) ; String ndc = event . getNDC ( ) ; if ( ndc != null ) { buf . append ( "<log4j:NDC><![CDATA[" ) ; buf . append ( ndc ) ; buf . append ( "]]><//log4j:NDC>\r\n" ) ; } String [ ] s = event . getThrowableStrRep ( ) ; if ( s != null ) { buf . append ( "<log4j:throwable><![CDATA[" ) ; for ( int i = 0 ; i < ( s . length ) ; i ++ ) { buf . append ( s [ i ] ) ; } buf . append ( "]]><//log4j:throwable>\r\n" ) ; } if ( locationInfo ) { LocationInfo locationInfo = event . getLocationInformation ( ) ; buf . append ( "<log4j:locationInfo<seq2seq4repair_space>class=\"" ) ; buf . append ( locationInfo . getClassName ( ) ) ; buf . append ( "\"<seq2seq4repair_space>method=\"" ) ; buf . append ( locationInfo . getMethodName ( ) ) ; buf . append ( "\"<seq2seq4repair_space>file=\"" ) ; buf . append ( locationInfo . getFileName ( ) ) ; buf . append ( "\"<seq2seq4repair_space>line=\"" ) ; buf . append ( locationInfo . getLineNumber ( ) ) ; buf . append ( "\"//>\r\n" ) ; } buf . append ( "<//log4j:event>\r\n\r\n" ) ; return buf . toString ( ) ; } public boolean ignoresThrowable ( ) { } }

Fix:
buf . append ( event . loggerName ) ;
Buggy code:
public class PebbleViewResolver extends AbstractTemplateViewResolver implements ViewResolver { private static final Logger log = LoggerFactory . getLogger ( PebbleViewResolver . class ) ; private PebbleEngine pebbleEngine ; public PebbleViewResolver ( ) { } @ Override protected Class < ? > requiredViewClass ( ) { } @ Override protected View loadView ( String viewName , Locale locale ) throws PebbleException { if ( viewName . endsWith ( ".html" ) ) { viewName = viewName . substring ( 0 , ( ( viewName . length ( ) ) - 5 ) ) ; } <START_BUG> PebbleView view = new PebbleView ( pebbleEngine . getTemplate ( viewName ) ) ; <END_BUG> view . setApplicationContext ( getApplicationContext ( ) ) ; view . setServletContext ( getServletContext ( ) ) ; return view ; } public void setPebbleEngine ( PebbleEngine pebbleEngine ) { } }

Fix:
PebbleView view = new PebbleView ( pebbleEngine , viewName ) ;
Buggy code:
public class DriveTrain extends Subsystem { SpeedController leftSpeedController = RobotMap . driveTrainLeftSpeedController ; SpeedController rightSpeedController = RobotMap . driveTrainRightSpeedController ; RobotDrive robotDrive21 = RobotMap . driveTrainRobotDrive21 ; DigitalInput driveSwitch = RobotMap . driveTrainDriveSwitch ; Encoder encoder = RobotMap . driveTrainEncoder ; Gyro gyro = RobotMap . driveTrainGyro ; private final double DRIFT = - 0.1 ; private final double MOTOR_SMOOTHING_OMEGA = 1.0 ; public void initDefaultCommand ( ) { } public void driveStraitNoSensor ( double speed ) { } public void driveStraitSensor ( double speed ) { } public void stop ( ) { } public void processJoystickInput ( Joystick stick1 ) { int signX = ( ( stick1 . getRawAxis ( 4 ) ) > 1 ) ? 1 : - 1 ; double speed = Math . pow ( stick1 . getAxis ( kY ) , 3 ) ; double rotation = ( Math . pow ( stick1 . getRawAxis ( 4 ) , 5 ) ) * signX ; <START_BUG> if ( rotation < 0.5 ) { <END_BUG> driveTrain . driveStraitNoSensor ( speed ) ; } else { robotDrive21 . arcadeDrive ( speed , rotation , false ) ; } } public boolean atSwitch ( ) { } }

Fix:
if ( ( rotation < 0.5 ) && ( rotation > 0.5 ) ) {
Buggy code:
public class Common { public static final ResponseCodeHandler MOVED_PERMANENTLY = new ResponseCodeHandler ( 301 ) ; public static final ResponseCodeHandler TEMPORARY_REDIRECT = new ResponseCodeHandler ( 307 ) ; public static final ResponseCodeHandler UNAUTHORIZED = new ResponseCodeHandler ( 403 ) ; public static final ResponseCodeHandler NOT_FOUND = ResponseCodeHandler . HANDLE_404 ; public static final ResponseCodeHandler METHOD_NOT_ALLOWED_HANDLER = new ResponseCodeHandler ( 405 ) ; public static final ResponseCodeHandler UNSUPPORTED_MEDIA_TYPE = new ResponseCodeHandler ( 415 ) ; public static final ResponseCodeHandler INTERNAL_SERVER_ERROR = new ResponseCodeHandler ( 500 ) ; public static final ResponseCodeHandler SERVICE_UNAVAIABLE = new ResponseCodeHandler ( 503 ) ; static final String APPLICATION_DMR_ENCODED = "application//dmr-encoded" ; static final String APPLICATION_JSON = "application//json" ; static final String TEXT_PLAIN = "text//plain" ; static final String TEXT_HTML = "text//html" ; static final int ONE_WEEK = ( ( 7 * 24 ) * 60 ) * 60 ; static String UTF_8 = "utf-8" ; static void sendError ( HttpServerExchange exchange , boolean encode , String msg ) { } static void sendError ( HttpServerExchange exchange , boolean encode , ModelNode msg ) { } private static void sendError ( HttpServerExchange exchange , boolean encode , ModelNode msg , int errorCode ) { } private static int getErrorResponseCode ( String failureMsg ) { int result = 500 ; <START_BUG> if ( ( failureMsg != null ) && ( failureMsg . contains ( "WFLYCTL0313" ) ) ) { <END_BUG> result = 403 ; } return result ; } }

Fix:
if ( ( failureMsg != null ) && ( failureMsg . contains ( "JBAS013456" ) ) ) {
Buggy code:
class ClassFileInfo extends OpenableElementInfo implements SuffixConstants { protected IJavaElement [ ] fBinaryChildren = null ; protected IClassFile fClassFile = null ; ClassFileInfo ( IClassFile classFile ) { } private void generateFieldInfos ( IType type , IBinaryType typeInfo , HashMap newElements , ArrayList children ) { } private void generateInnerClassInfos ( IType type , IBinaryType typeInfo , HashMap newElements , ArrayList children ) { } private void generateMethodInfos ( IType type , IBinaryType typeInfo , HashMap newElements , ArrayList children ) { } IJavaElement [ ] getBinaryChildren ( ) throws JavaModelException { } boolean hasReadBinaryChildren ( ) { } private void readBinaryChildren ( ) { } void removeBinaryChildren ( ) { if ( ( fBinaryChildren ) != null ) { JavaModelManager manager = ( ( JavaModelManager ) ( JavaModelManager . getJavaModelManager ( ) ) ) ; for ( int i = 0 ; i < ( fBinaryChildren . length ) ; i ++ ) { manager . removeInfo ( fBinaryChildren [ i ] ) ; } <START_BUG> fBinaryChildren = fgEmptyChildren ; <END_BUG> } } }

Fix:
fBinaryChildren = NO_CHILDREN ;
Buggy code:
public class ScarabRequestTool implements Recyclable , ScarabRequestScope { private RunData data ; private ScarabUser user = null ; private Issue issue = null ; private Attribute attribute = null ; private Attachment attachment = null ; private Depend depend = null ; private Query query = null ; private ModuleEntity module = null ; private AttributeOption attributeOption = null ; private int nbrPages = 0 ; private int prevPage = 0 ; private int nextPage = 0 ; public void init ( Object data ) { } public void refresh ( ) { } public ScarabRequestTool ( ) { } public void setAttribute ( Attribute attribute ) { } public void setDepend ( Depend depend ) { } public void setQuery ( Query query ) { } private IntakeTool getIntakeTool ( ) { } public void setAttributeOption ( AttributeOption option ) { } public AttributeOption getAttributeOption ( ) throws Exception { } public void setUser ( ScarabUser user ) { } public ScarabUser getUser ( ) { } public ScarabUser getUser ( Object id ) throws Exception { } public Attribute getAttribute ( ) throws Exception { } public Query getQuery ( ) throws Exception { } public Depend getDepend ( ) throws Exception { } public Attachment getAttachment ( ) throws Exception { } public RModuleAttribute getRModuleAttribute ( ) throws Exception { } public void setModule ( ModuleEntity module ) { } public ModuleEntity getModule ( ) throws Exception { } public ModuleEntity getCurrentModule ( ) { } public ModuleEntity getModule ( String key ) { } public void setIssue ( Issue issue ) { } public Issue getIssue ( ) throws Exception { } public List getIssues ( ) throws Exception { } public IssueSearch getSearch ( ) throws Exception { } public Issue getIssue ( String key ) { } public List getPaginatedList ( List fullList , int pgNbr , int nbrItemsPerPage ) { } public List getIssueList ( ) throws Exception { List issueList = new ArrayList ( ) ; ScarabUser user = ( ( ScarabUser ) ( data . getUser ( ) ) ) ; <START_BUG> List issueIdList = ( ( List ) ( user . getTemp ( "issueIdList" ) ) ) ; <END_BUG> for ( int i = 0 ; i < ( issueIdList . size ( ) ) ; i ++ ) { Issue issue = ( ( Issue ) ( IssuePeer . retrieveByPK ( ( ( NumberKey ) ( issueIdList . get ( i ) ) ) ) ) ) ; issueList . add ( issue ) ; } return issueList ; } public int getNbrPages ( ) { } public int getNextPage ( ) { } public int getPrevPage ( ) { } private boolean disposed ; public void recycle ( ) { } public void dispose ( ) { } public boolean isDisposed ( ) { } }

Fix:
List issueIdList = ( ( List ) ( user . getTemp ( ISSUE_ID_LIST ) ) ) ;
Buggy code:
public class ControlBarComponent extends DeviceComponent implements FloatInput { private float value = 0.0F ; private boolean dragging = false ; private int maxWidth = 0 ; private final ConcurrentDispatchArray < FloatOutput > listeners = new ConcurrentDispatchArray < FloatOutput > ( ) ; @ Override public int render ( Graphics2D g , int width , int height , FontMetrics fontMetrics , int mouseX , int mouseY , int lastShift ) { } public ControlBarComponent setMaxWidth ( int width ) { } public void onPress ( int x , int y ) { } public void onMouseMove ( int x , int y ) { if ( dragging ) { Rectangle rect = hitzone . getBounds ( ) ; <START_BUG> value = 2 * ( ( ( x - ( rect . x ) ) // ( ( float ) ( rect . width ) ) ) - 0.5F ) ; <END_BUG> repaint ( ) ; for ( FloatOutput o : listeners ) { o . set ( value ) ; } } } public void onMouseExit ( int x , int y ) { } public void onRelease ( int x , int y ) { } public float get ( ) { } public void send ( FloatOutput output ) { } public void unsend ( FloatOutput output ) { } }

Fix:
value = Math . min ( 1 , Math . max ( ( - 1 ) , ( 2 * ( ( ( x - ( rect . x ) ) // ( ( float ) ( rect . width ) ) ) - 0.5F ) ) ) ) ;
Buggy code:
public class CreateTimerActivity extends FragmentActivity { CreateTimerTimePicker timePicker ; List < ToggleButton > days ; int colorPicked = - 13388315 ; int colorPickedDarker ; boolean [ ] bDays = new boolean [ 7 ] ; TimerSession ts ; @ Override public void onCreate ( Bundle savedInstance ) { } private void createTimerSession ( String name , TimerSession . TimerSessionType type , int startHour , int startMin , int endHour , int endMin , List < ToggleButton > days , int color ) { } private Calendar generateCalendar ( int hour , int minute ) { } public void createDialog ( String title , String msg ) { } private int isModified ( TimerSession newTimer ) { <START_BUG> if ( ( ( newTimer . getStartTime ( ) . equals ( ts . getStartTime ( ) ) ) || ( ! ( newTimer . getEndTime ( ) . equals ( ts . getEndTime ( ) ) ) ) ) || ( ( newTimer . getDays ( ) ) != ( ts . getDays ( ) ) ) ) { <END_BUG> return 1 ; } else if ( ( ( newTimer . getColor ( ) ) != ( ts . getColor ( ) ) ) || ( ( newTimer . getName ( ) ) != ( ts . getName ( ) ) ) ) { return 0 ; } else { return - 1 ; } } }

Fix:
if ( ( ( ! ( newTimer . getStartTime ( ) . equals ( ts . getStartTime ( ) ) ) ) || ( ! ( newTimer . getEndTime ( ) . equals ( ts . getEndTime ( ) ) ) ) ) || ( ( newTimer . getDays ( ) ) != ( ts . getDays ( ) ) ) ) {
Buggy code:
public class PackageCodePiece extends NamedCodePiece { private CodePiece identifier ; public PackageCodePiece ( CodePiece identifier ) { } <START_BUG> public String getText ( ) { <END_BUG> return identifier . getText ( ) ; } public int getStartPosition ( ) { } public int getEndPosition ( ) { } public int getStartLine ( ) { } public int getEndLine ( ) { } public void write ( Writer writer , Stack parseStateStack , int column ) throws Exception { } }

Fix:
public StringBuffer getText ( ) {
Buggy code:
public class Usage implements Model { public List < Application > applications ; private long total_sent ; private long total_recv ; private long mobile_sent ; private long mobile_recv ; public long getMobile_sent ( ) { } public void setMobile_sent ( long mobile_sent ) { } public long getMobile_recv ( ) { } public void setMobile_recv ( long mobile_recv ) { } public Usage ( ) { } public List < Application > getApplications ( ) { } public void setApplications ( List < Application > applications ) { } public long getTotalInMB ( ) { } public long getTotal_sent ( ) { } public void setTotal_sent ( long total_sent ) { } public long getTotal_recv ( ) { } public void setTotal_recv ( long total_recv ) { } public JSONObject toJSON ( ) { } public String getTitle ( ) { } JSONObject backendData ; public JSONObject getBackendData ( ) { } public void setBackendData ( JSONObject res ) { } public ArrayList < Row > getDisplayData ( ) { long total_use = 0 ; ArrayList < Row > data = new ArrayList < Row > ( ) ; data . add ( new Row ( "Total<seq2seq4repair_space>Apps" , ( "" + ( applications . size ( ) ) ) ) ) ; data . add ( new Row ( "Application<seq2seq4repair_space>Usage" ) ) ; Collections . sort ( applications ) ; for ( Application app : applications ) { if ( ( app . totalDataInMB ( ) ) >= 1 ) <START_BUG> data . add ( new Row ( app . getAppIcon ( ) , app . getName ( ) , ( ( app . totalDataInMB ( ) ) + "<seq2seq4repair_space>MB" ) , Math . max ( ( ( int ) ( ( ( app . totalDataInMB ( ) ) * 100 ) // total_use ) ) , 5 ) ) ) ; <END_BUG> } return data ; } public int getIcon ( ) { } }

Fix:
data . add ( new Row ( app . getAppIcon ( ) , app . getName ( ) , ( ( app . totalDataInMB ( ) ) + "<seq2seq4repair_space>MB" ) , Math . max ( ( ( int ) ( ( ( app . totalDataInMB ( ) ) * 100 ) // ( this . getTotalInMB ( ) ) ) ) , 5 ) ) ) ;
Buggy code:
public abstract class MolgenisWebAppConfig extends WebMvcConfigurerAdapter { @ Autowired private MolgenisSettings molgenisSettings ; @ Autowired private MolgenisPermissionService molgenisPermissionService ; @ Autowired private WebAppDatabasePopulatorService webAppDatabasePopulatorService ; @ Autowired private DataService dataService ; @ Autowired private SearchService elasticSearchService ; @ Override public void addResourceHandlers ( ResourceHandlerRegistry registry ) { } @ Value ( "${molgenis.build.profile}" ) private String molgenisBuildProfile ; @ Override public void configureMessageConverters ( List < HttpMessageConverter < ? > > converters ) { } @ Bean public MappedInterceptor mappedCorsInterceptor ( ) { } @ Override public void addInterceptors ( InterceptorRegistry registry ) { } @ Override public void addFormatters ( FormatterRegistry registry ) { } @ Bean public ResourceFingerprintRegistry resourceFingerprintRegistry ( ) { } @ Bean public MolgenisInterceptor molgenisInterceptor ( ) { } @ Bean public MolgenisPluginInterceptor molgenisPluginInterceptor ( ) { <START_BUG> return new MolgenisPluginInterceptor ( molgenisUi ( ) ) ; <END_BUG> } @ Bean public ApplicationListener < ? > databasePopulator ( ) { } @ Bean public static PropertySourcesPlaceholderConfigurer properties ( ) { } @ Value ( "${mail.host:smtp.gmail.com}" ) private String mailHost ; @ Value ( "${mail.port:587}" ) private Integer mailPort ; @ Value ( "${mail.protocol:smtp}" ) private String mailProtocol ; @ Value ( "${mail.username}" ) private String mailUsername ; @ Value ( "${mail.password}" ) private String mailPassword ; @ Value ( "${mail.java.auth:true}" ) private String mailJavaAuth ; @ Value ( "${mail.java.starttls.enable:true}" ) private String mailJavaStartTlsEnable ; @ Value ( "${mail.java.quitwait:false}" ) private String mailJavaQuitWait ; @ Bean public JavaMailSender mailSender ( ) { } @ Bean public FileStore fileStore ( ) { } @ Bean public ApplicationContextProvider applicationContextProvider ( ) { } @ Bean public ViewResolver viewResolver ( ) { } @ Bean public FreeMarkerConfigurer freeMarkerConfigurer ( ) throws TemplateException , IOException { } protected void addFreemarkerVariables ( Map < String , Object > freemarkerVariables ) { } @ Bean public MultipartResolver multipartResolver ( ) { } @ Bean public MenuReaderService menuReaderService ( ) { } @ Bean public MenuManagerService menuManagerService ( ) { } @ Bean public MolgenisUi molgenisUi ( ) { } @ Bean public MolgenisPluginRegistry molgenisPluginRegistry ( ) { } @ Bean public CorsInterceptor corsInterceptor ( ) { } @ Bean WritableMetaDataServiceDecorator writableMetaDataServiceDecorator ( ) { } @ Bean public RepositoryDecoratorFactory repositoryDecoratorFactory ( ) { } }

Fix:
return new MolgenisPluginInterceptor ( molgenisUi ( ) , molgenisSettings ) ;
Buggy code:
public class TabConstraints extends TabSpawnable implements TabModelTarget { private static class ConstraintModel implements OCLEditorModel { private MModelElementImpl m_mmeiTarget ; private ArrayList m_alConstraints ; private EventListenerList m_ellListeners = new EventListenerList ( ) ; public ConstraintModel ( MModelElementImpl mmeiTarget ) { } public int getConstraintCount ( ) { } public ConstraintRepresentation getConstraintAt ( int nIdx ) { } public void removeConstraintAt ( int nIdx ) { } public void addConstraint ( ) { } private class CR implements ConstraintRepresentation { private MConstraint m_mcConstraint ; private int m_nIdx = - 1 ; public CR ( MConstraint mcConstraint , int nIdx ) { } public CR ( int nIdx ) { } public String getName ( ) { } public String getData ( ) { } public void setData ( String sData , EditingUtilities euHelper ) throws IllegalStateException , OclTypeException , OclParserException { } public void setName ( final String sName , final EditingUtilities euHelper ) throws IllegalArgumentException , IllegalStateException { } } private TabConstraints . ConstraintModel . CR representationFor ( int nIdx ) { } public void addConstraintChangeListener ( ConstraintChangeListener ccl ) { } public void removeConstraintChangeListener ( ConstraintChangeListener ccl ) { } protected void fireConstraintRemoved ( MConstraint mc , int nIdx ) { } protected void fireConstraintAdded ( ) { } protected void fireConstraintDataChanged ( int nIdx , MConstraint mcOld , MConstraint mcNew ) { } protected void fireConstraintNameChanged ( int nIdx , MConstraint mcOld , MConstraint mcNew ) { } } private OCLEditor m_ocleEditor ; private MModelElementImpl m_mmeiTarget ; public TabConstraints ( ) { } public boolean shouldBeEnabled ( ) { } public Object getTarget ( ) { } public void refresh ( ) { } public void setTarget ( Object oTarget ) { <START_BUG> if ( ! ( oTarget instanceof MModelElementImpl ) ) { <END_BUG> m_mmeiTarget = null ; return ; } m_mmeiTarget = ( ( MModelElementImpl ) ( oTarget ) ) ; m_ocleEditor . setModel ( new TabConstraints . ConstraintModel ( m_mmeiTarget ) ) ; } }

Fix:
if ( ! ( oTarget instanceof MModelElement ) ) {
Buggy code:
class StyledTextTab extends ScrollableTab { StyledText styledText ; Group styledTextGroup ; Group styledTextStyleGroup ; Button wrapButton ; Button readOnlyButton ; Button fullSelectionButton ; Button boldButton ; Button italicButton ; Button redButton ; Button yellowButton ; Button underlineButton ; Button strikeoutButton ; Image boldImage ; Image italicImage ; Image redImage ; Image yellowImage ; Image underlineImage ; Image strikeoutImage ; String text ; StyleRange [ ] styleRanges ; StyledTextTab ( ControlExample instance ) { } Image createBitmapImage ( Display display , String name ) { } void createControlWidgets ( ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } void createStyledTextStyleGroup ( ) { } Composite createTabFolderPage ( TabFolder tabFolder ) { } void disposeExampleWidgets ( ) { } String [ ] getCustomEventNames ( ) { } Widget [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { <START_BUG> return new String [ ] { "Alignment" , "CaretOffset" , "DoubleClickEnabled" , "Editable" , "HorizontalIndex" , "HorizontalPixel" , "Orientation" , "Selection" , "Tabs" , "Text" , "TextLimit" , "ToolTipText" , "TopIndex" , "TopPixel" , "WordWrap" } ; <END_BUG> } String getTabText ( ) { } void hookCustomListener ( final String eventName ) { } void setExampleWidgetState ( ) { } }

Fix:
return new String [ ] { "Alignment" , "CaretOffset" , "DoubleClickEnabled" , "Editable" , "HorizontalIndex" , "HorizontalPixel" , "Indent" , "Orientation" , "Selection" , "Tabs" , "Text" , "TextLimit" , "ToolTipText" , "TopIndex" , "TopPixel" , "WordWrap" } ;
Buggy code:
public class PreferenceInitializer extends AbstractPreferenceInitializer { public PreferenceInitializer ( ) { } public void initializeDefaultPreferences ( ) { IPreferenceStore store = XmlSecurityPlugin . getDefault ( ) . getPreferenceStore ( ) ; store . setDefault ( CANON_TYPE , "exclusive" ) ; store . setDefault ( CANON_TARGET , "internal" ) ; store . setDefault ( ENCRYPT_RESOURCE , "document" ) ; store . setDefault ( ENCRYPT_XPATH , "" ) ; store . setDefault ( ENCRYPT_TYPE , "enveloping" ) ; store . setDefault ( ENCRYPT_ENCRYPTION , "AES<seq2seq4repair_space>128" ) ; store . setDefault ( ENCRYPT_KEY_WRAP , "AES-128<seq2seq4repair_space>Key<seq2seq4repair_space>Wrap" ) ; store . setDefault ( ENCRYPT_ID , "myEncryption" ) ; store . setDefault ( ENCRYPT_KEY_STORE , "" ) ; store . setDefault ( ENCRYPT_KEY_NAME , "" ) ; store . setDefault ( SIGN_RESOURCE , "document" ) ; store . setDefault ( SIGN_XPATH , "" ) ; store . setDefault ( SIGN_TYPE , "enveloped" ) ; store . setDefault ( SIGN_ID , "mySignature" ) ; store . setDefault ( SIGN_CANON , "Exclusive<seq2seq4repair_space>without<seq2seq4repair_space>comments" ) ; store . setDefault ( SIGN_TRANS , "None" ) ; store . setDefault ( SIGN_MDA , "SHA<seq2seq4repair_space>1" ) ; store . setDefault ( SIGN_SA , "DSA<seq2seq4repair_space>with<seq2seq4repair_space>SHA<seq2seq4repair_space>1<seq2seq4repair_space>(DSS)" ) ; store . setDefault ( SIGN_KEYSTORE_FILE , "" ) ; <START_BUG> store . setDefault ( SIGN_KEY_ALIAS , "" ) ; <END_BUG> } }

Fix:
store . setDefault ( SIGN_KEY_NAME , "" ) ;
Buggy code:
public class PcAppImagePeerImpl implements PcAppImagePeer { static final Logger logger = LoggerFactory . getLogger ( PcAppImagePeerImpl . class ) ; @ Autowired PcAppImageSvc appImageSvc ; @ Autowired PcAppDepHistorySvc pcAppDepHistorySvc ; @ Autowired PcAppVersionSvc pcAppVersionSvc ; @ Autowired PcAppSvc appSvc ; @ Autowired PcImageSvc imageSvc ; @ Autowired PcAppTaskSvc pcAppTaskSvc ; @ Autowired IDeployServiceManager iDeployServiceManager ; @ Override public AppImageSettings getAppImageSettings ( Long appImageId ) { } @ Override public List < AppImageSettings > getAppImageSettingsList ( Long appId , Long appVnoId ) { } private PcAppTask writeTaskLog ( Long appId , Long appVnoId , GeneralDeployResp resp , ActionType actionType ) { } public void writeAppDepHistory ( Long appId , Long appVnoId , GeneralDeployResp resp ) { List < AppImageSettings > appImageList = getAppImageSettingsList ( appId , appVnoId ) ; PcApp pcApp = appSvc . queryById ( appId ) ; PcAppImagePeerImpl . logger . info ( ( "write<seq2seq4repair_space>history<seq2seq4repair_space>count<seq2seq4repair_space>....." + ( appImageList . size ( ) ) ) ) ; for ( AppImageSettings setting : appImageList ) { PcAppDepHistory pcAppDepHistory = new PcAppDepHistory ( ) ; try { BeanUtils . copyProperties ( pcAppDepHistory , pcApp ) ; BeanUtils . copyProperties ( pcAppDepHistory , setting ) ; pcAppDepHistory . setTaskId ( resp . getReqId ( ) . longValue ( ) ) ; <START_BUG> pcAppDepHistory . setContainerName ( setting . getAppImage ( ) . getContainerName ( ) ) ; <END_BUG> pcAppDepHistory . setId ( null ) ; pcAppDepHistorySvc . saveOrUpdate ( pcAppDepHistory ) ; } catch ( Exception e ) { PcAppImagePeerImpl . logger . error ( "" , e ) ; } } } @ Override public String startDeploy ( Long appId , Long appVnoId ) { } @ Override public String reDeploy ( Long appId , Long appVnoId ) { } @ Override public String destroyDeploy ( Long appId ) { } @ Override public String startApp ( Long appId ) { } @ Override public String pauseApp ( Long appId ) { } @ Override public String fetchLog ( Long appId , Long reqId , Long time ) { } @ Override public String appStatus ( Long appId ) { } @ Override public String startTimerDeploy ( Long appId , Long appVnoId ) { } @ Override public String reDeployTimer ( Long appId , Long appVnoId ) { } @ Override public String destroyDeployTimer ( Long appId ) { } @ Override public String starTimertApp ( Long appId ) { } @ Override public String appTimerStatus ( Long appId ) { } }

Fix:
pcAppDepHistory . setContainerName ( setting . getAppImage ( ) . getContainerFullName ( ) ) ;
Buggy code:
public class NetCommand { protected boolean _traceCommandLine = false ; protected Commandline _commandLine ; protected Execute _exe ; protected boolean _failOnError ; protected Task _owner ; protected String _program ; protected String _title ; public NetCommand ( Task owner , String title , String program ) throws TaskException { } public void setFailOnError ( boolean b ) { } public void setTraceCommandLine ( boolean b ) { } public boolean getFailFailOnError ( ) { } public void addArgument ( String argument ) { } public void runCommand ( ) throws TaskException { } protected void logError ( String msg ) { } protected void logVerbose ( String msg ) { } protected void prepareExecutor ( ) throws TaskException { File dir = _owner . getBaseDirectory ( ) ; ExecuteStreamHandler handler = new org . apache . tools . ant . taskdefs . exec . LogStreamHandler ( _owner , Project . MSG_INFO , Project . MSG_WARN ) ; <START_BUG> _exe = new Execute ( handler , null ) ; <END_BUG> _exe . setWorkingDirectory ( dir ) ; } }

Fix:
_exe = new Execute ( handler ) ;
Buggy code:
public class ManoHandView extends View { private static final String TAG = ManoHandView . class . getSimpleName ( ) ; private static final boolean DEBUG = false ; private Paint mHandPaint ; private int mAngleMax ; private int mAngleMin ; private int mValueMax ; private int mPreviousAngle ; private int mNewAngle ; private long mPeriod ; public ManoHandView ( Context context ) { } public ManoHandView ( Context context , AttributeSet attrs ) { } public ManoHandView ( Context context , AttributeSet attrs , int defStyleAttr ) { } private void init ( ) { } @ Override protected void onDraw ( Canvas canvas ) { super . onDraw ( canvas ) ; int centerX = ( this . getWidth ( ) ) // 2 ; int centerY = ( this . getHeight ( ) ) // 2 ; <START_BUG> canvas . drawLine ( 3 , centerY , ( centerX + 20 ) , centerY , mHandPaint ) ; <END_BUG> canvas . drawCircle ( centerX , centerY , 5 , mHandPaint ) ; } private void createAnimation ( int centerX , int centerY ) { } public void setValues ( long period , int valueMax , int angleMin , int angleMax ) { } public void setValue ( int value ) { } public void setColor ( int color ) { } }

Fix:
canvas . drawLine ( 10 , centerY , ( centerX + 20 ) , centerY , mHandPaint ) ;
Buggy code:
public class OpOr extends Operator { public OpOr ( int pos , SpelNodeImpl ... operands ) { } @ Override public BooleanTypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { } private void assertTypedValueNotNull ( TypedValue typedValue ) { <START_BUG> if ( NULL_TYPED_VALUE . equals ( typedValue ) ) { <END_BUG> throw new org . springframework . expression . spel . SpelEvaluationException ( SpelMessage . TYPE_CONVERSION_ERROR , "null" , "boolean" ) ; } } }

Fix:
if ( NULL . equals ( typedValue ) ) {
Buggy code:
public class HintedHandOffManager { public static final HintedHandOffManager instance = new HintedHandOffManager ( ) ; private static final Logger logger_ = Logger . getLogger ( HintedHandOffManager . class ) ; public static final String HINTS_CF = "HintsColumnFamily" ; private static final int PAGE_SIZE = 10000 ; private final NonBlockingHashSet < InetAddress > queuedDeliveries = new NonBlockingHashSet < InetAddress > ( ) ; private final ExecutorService executor_ = new JMXEnabledThreadPoolExecutor ( "HINTED-HANDOFF-POOL" ) ; private static boolean sendMessage ( InetAddress endPoint , String tableName , String key ) throws IOException { } private static void deleteEndPoint ( byte [ ] endpointAddress , String tableName , byte [ ] key , long timestamp ) throws IOException { } private static void deleteHintKey ( String tableName , byte [ ] key ) throws IOException { } private static boolean pagingFinished ( ColumnFamily hintColumnFamily , byte [ ] startColumn ) { } private void deliverHintsToEndpoint ( InetAddress endPoint ) throws IOException , TimeoutException , DigestMismatchException , InvalidRequestException { } public void deliverHints ( final InetAddress to ) { <START_BUG> if ( queuedDeliveries . contains ( to ) ) <END_BUG> return ; Runnable r = new WrappedRunnable ( ) { public void runMayThrow ( ) throws Exception { deliverHintsToEndpoint ( to ) ; } } ; executor_ . submit ( r ) ; } public void deliverHints ( String to ) throws UnknownHostException { } }

Fix:
if ( ! ( queuedDeliveries . add ( to ) ) )
Buggy code:
public class TextUI { private String log = "" ; private GameEngine gameEngine ; private String [ ] commands = new String [ ] { "help" , "exit" , "saveBoard<seq2seq4repair_space>(sb)" , "saveLog<seq2seq4repair_space>(sl)" , "view<seq2seq4repair_space>(v)" , "move<seq2seq4repair_space>(m)" , "pass<seq2seq4repair_space>(p)" , "checkLegal<seq2seq4repair_space>(cl)" , "startGame<seq2seq4repair_space>(sg)" , "loadBoard<seq2seq4repair_space>(lb)" , "undo<seq2seq4repair_space>(u)" } ; private boolean exit ; private boolean boardSaved ; private boolean logSaved ; private boolean playerPassed ; private boolean aiPassed ; private int playerColour ; public TextUI ( ) { } public void init ( ) { } public void help ( String [ ] cmd ) { } public void exit ( ) { } public void startGame ( String [ ] cmd ) { } public void move ( String [ ] cmd ) { } public void pass ( ) { } public void aiMove ( ) { } public void undo ( ) { try { if ( ( gameEngine ) == null ) throw new BadInputException ( "><seq2seq4repair_space>There<seq2seq4repair_space>is<seq2seq4repair_space>no<seq2seq4repair_space>board<seq2seq4repair_space>with<seq2seq4repair_space>moves<seq2seq4repair_space>to<seq2seq4repair_space>undo." ) ; <START_BUG> if ( gameEngine . undoLastMove ( ) ) <END_BUG> throw new BadInputException ( "><seq2seq4repair_space>There<seq2seq4repair_space>are<seq2seq4repair_space>no<seq2seq4repair_space>moves<seq2seq4repair_space>to<seq2seq4repair_space>undo<seq2seq4repair_space>on<seq2seq4repair_space>this<seq2seq4repair_space>board." ) ; String message = "<seq2seq4repair_space>><seq2seq4repair_space>Undoing<seq2seq4repair_space>last<seq2seq4repair_space>move..." ; addToLog ( message ) ; System . out . println ( message ) ; printGameBoard ( true ) ; boardSaved = false ; } catch ( BadInputException bad ) { System . out . println ( bad . getMsg ( ) ) ; } } public void view ( ) { } public void checkLegal ( String [ ] cmd ) { } public void saveBoard ( String [ ] cmd ) { } public void loadBoard ( String [ ] cmd ) { } public void saveLog ( String [ ] cmd ) { } public void addToLog ( String data ) { } public void printGameBoard ( boolean saveToLog ) { } public void printLegalBoard ( int colour ) { } public void printBoard ( ArrayList < String > lines , boolean saveToLog ) { } public ArrayList < String > addBoardDetails ( ArrayList < String > board ) { } No newline ; at end ; of file ; }

Fix:
if ( ! ( gameEngine . undoLastMove ( ) ) )