nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FigAssociation extends FigEdgeModelElement { public static boolean SUPPRESS_BIDIRECTIONAL_ARROWS = true ; protected FigTextGroup _srcGroup = new FigTextGroup ( ) ; protected FigTextGroup _destGroup = new FigTextGroup ( ) ; protected FigTextGroup _middleGroup = new FigTextGroup ( ) ; protected FigText _srcMult ; protected FigText _srcRole ; protected FigText _destMult ; protected FigText _destRole ; protected FigText _srcOrdering ; protected FigText _destOrdering ; protected ArrowHead sourceArrowHead ; protected ArrowHead destArrowHead ; public FigAssociation ( ) { } public FigAssociation ( Object edge , Layer lay ) { } public void setOwner ( Object own ) { Object oldOwner = getOwner ( ) ; super . setOwner ( own ) ; <START_BUG> if ( ( ! ( own . equals ( oldOwner ) ) ) && ( oldOwner instanceof MAssociation ) ) { <END_BUG> ( ( MAssociation ) ( oldOwner ) ) . remove ( ) ; } if ( own instanceof MAssociation ) { MAssociation newAsc = ( ( MAssociation ) ( own ) ) ; for ( int i = 0 ; i < ( newAsc . getConnections ( ) . size ( ) ) ; i ++ ) ( ( MAssociationEnd ) ( ( ( Object [ ] ) ( newAsc . getConnections ( ) . toArray ( ) ) ) [ i ] ) ) . addMElementListener ( this ) ; newAsc . addMElementListener ( this ) ; MAssociationEnd ae0 = ( ( MAssociationEnd ) ( ( ( Object [ ] ) ( newAsc . getConnections ( ) . toArray ( ) ) ) [ 0 ] ) ) ; MAssociationEnd ae1 = ( ( MAssociationEnd ) ( ( ( Object [ ] ) ( newAsc . getConnections ( ) . toArray ( ) ) ) [ 1 ] ) ) ; FigNode destNode = ( ( FigNode ) ( getLayer ( ) . presentationFor ( ae1 . getType ( ) ) ) ) ; FigNode srcNode = ( ( FigNode ) ( getLayer ( ) . presentationFor ( ae0 . getType ( ) ) ) ) ; if ( destNode != null ) { setDestFigNode ( destNode ) ; setDestPortFig ( destNode ) ; } if ( srcNode != null ) { setSourceFigNode ( srcNode ) ; setSourcePortFig ( srcNode ) ; } } modelChanged ( ) ; } protected void textEdited ( FigText ft ) throws PropertyVetoException { } protected void modelChanged ( ) { } static ArrowHead _NAV_AGGREGATE = new ArrowHeadComposite ( ArrowHeadDiamond . WhiteDiamond , ArrowHeadGreater . TheInstance ) ; static ArrowHead _NAV_COMP = new ArrowHeadComposite ( ArrowHeadDiamond . BlackDiamond , ArrowHeadGreater . TheInstance ) ; protected ArrowHead chooseArrowHead ( MAggregationKind ak , boolean nav ) { } public Vector getPopUpActions ( MouseEvent me ) { } private String getOrderingName ( MOrderingKind ok ) { } static final long serialVersionUID = 9100125695919853919L ; public void paint ( Graphics g ) { } public void mousePressed ( MouseEvent e ) { } public Selection makeSelection ( ) { } }

Fix:
if ( ( ( oldOwner != null ) && ( ! ( oldOwner . equals ( own ) ) ) ) && ( oldOwner instanceof MAssociation ) ) {
Buggy code:
public class ChartDataSupport { private final XAxisChart type ; public ChartDataSupport ( final XAxisChart type ) { } public List < ChartDataWrapper > convertAndSort ( final List < ITraining > data ) { } public List < ChartDataWrapper > createPastData ( final PastTraining dataPast , final List < ChartDataWrapper > now ) { Assertions . notNull ( dataPast ) ; Assertions . notNull ( now ) ; final List < ChartDataWrapper > past = new ArrayList < > ( ) ; if ( ! ( DAY . equals ( type ) ) ) { past . addAll ( convertAndSort ( dataPast . getTrainings ( ) ) ) ; <START_BUG> if ( ! ( YEAR . equals ( type ) ) ) { <END_BUG> adjust ( past , now , dataPast . getYearOffset ( ) ) ; } Collections . sort ( past ) ; } return past ; } private void adjust ( final List < ChartDataWrapper > past , final List < ChartDataWrapper > now , final int yearOffset ) { } }

Fix:
if ( ( ! ( YEAR . equals ( type ) ) ) && ( ! ( YEAR_START_TILL_NOW . equals ( type ) ) ) ) {
Buggy code:
public class MonthDV extends AbstractDateTimeDV { public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { try { return parse ( content , null ) ; } catch ( Exception ex ) { <START_BUG> throw new InvalidDatatypeValueException ( "not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>month" ) ; <END_BUG> } } protected int [ ] parse ( String str , int [ ] date ) throws SchemaDateTimeException { } protected short compareDates ( int [ ] date1 , int [ ] date2 ) { } protected String dateToString ( int [ ] date ) { } }

Fix:
throw new InvalidDatatypeValueException ( "cvc-datatype-valid.1.2.1" , new Object [ ] { content , "gMonth" } ) ;
Buggy code:
public class FinallyFlowContext extends FlowContext { Reference [ ] finalAssignments ; int assignCount ; public FinallyFlowContext ( FlowContext parent , AstNode associatedNode ) { } public void complainOnRedundantFinalAssignments ( FlowInfo flowInfo , BlockScope scope ) { for ( int i = 0 ; i < ( assignCount ) ; i ++ ) { Reference ref ; <START_BUG> if ( ( ref = finalAssignments [ i ] ) . isFieldReference ( ) ) { <END_BUG> if ( flowInfo . isPotentiallyAssigned ( ref . fieldBinding ( ) ) ) { scope . problemReporter ( ) . duplicateInitializationOfBlankFinalField ( ref . fieldBinding ( ) , ref ) ; } } else { if ( flowInfo . isPotentiallyAssigned ( ( ( LocalVariableBinding ) ( ( ( NameReference ) ( ref ) ) . binding ) ) ) ) { scope . problemReporter ( ) . duplicateInitializationOfFinalLocal ( ( ( LocalVariableBinding ) ( ( ( NameReference ) ( ref ) ) . binding ) ) , ( ( NameReference ) ( ref ) ) ) ; } } FlowContext currentContext = parent ; while ( currentContext != null ) { if ( currentContext . isSubRoutine ( ) ) { currentContext . removeFinalAssignmentIfAny ( ref ) ; } currentContext = currentContext . parent ; } } } public boolean isSubRoutine ( ) { } boolean recordFinalAssignment ( VariableBinding binding , Reference finalAssignment ) { } }

Fix:
if ( ( ( ( ref = finalAssignments [ i ] ) . bits ) & ( BindingIds . FIELD ) ) != 0 ) {
Buggy code:
public class ChatRoomManagerUI { IChatRoomManager manager ; public ChatRoomManagerUI ( IChatRoomManager manager ) { } public ChatRoomManagerUI setup ( final IContainer newClient , final ID targetID , String username ) { Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { try { IChatRoomInfo roomInfo = manager . getChatRoomInfo ( targetID . getName ( ) ) ; IChatRoomContainer chatRoom = null ; try { chatRoom = roomInfo . createChatRoomContainer ( ) ; } catch ( ContainerCreateException e1 ) { } IChatRoomMessageSender sender = chatRoom . getChatRoomMessageSender ( ) ; IWorkbenchWindow ww = PlatformUI . getWorkbench ( ) . getActiveWorkbenchWindow ( ) ; IWorkbenchPage wp = ww . getActivePage ( ) ; IViewPart view = wp . showView ( "org.eclipse.ecf.ui.views.ChatRoomView" ) ; final ChatRoomView chatroomview = ( ( ChatRoomView ) ( view ) ) ; chatroomview . initialize ( new IChatRoomViewCloseListener ( ) { public void chatRoomViewClosing ( String secondaryID ) { newClient . dispose ( ) ; } } , null , chatRoom , roomInfo , sender ) ; chatRoom . addMessageListener ( new IIMMessageListener ( ) { public void handleMessageEvent ( IIMMessageEvent messageEvent ) { if ( messageEvent instanceof IChatRoomMessageEvent ) { IChatRoomMessage m = ( ( IChatRoomMessageEvent ) ( messageEvent ) ) . getChatRoomMessage ( ) ; chatroomview . handleMessage ( m . getFromID ( ) , m . getMessage ( ) ) ; } } } ) ; chatRoom . addChatRoomParticipantListener ( new IChatRoomParticipantListener ( ) { <START_BUG> public void handlePresence ( ID fromID , IPresence presence ) { <END_BUG> chatroomview . handlePresence ( fromID , presence ) ; } public void handleArrived ( IUser participant ) { chatroomview . handleJoin ( participant ) ; } public void handleUpdated ( IUser updatedParticipant ) { chatroomview . handleUpdated ( updatedParticipant ) ; } public void handleDeparted ( IUser participant ) { chatroomview . handleLeave ( participant ) ; } } ) ; } catch ( PartInitException e ) { ClientPlugin . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , ClientPlugin . PLUGIN_ID , 0 , ( "Exception<seq2seq4repair_space>in<seq2seq4repair_space>chat<seq2seq4repair_space>room<seq2seq4repair_space>view<seq2seq4repair_space>initialization<seq2seq4repair_space>for<seq2seq4repair_space>chat<seq2seq4repair_space>room<seq2seq4repair_space>" + targetID ) , e ) ) ; } } } ) ; return this ; } }

Fix:
public void handlePresenceUpdated ( ID fromID , IPresence presence ) {
Buggy code:
public class AllTestsAspectJ150 { public static Test suite ( ) { TestSuite suite = new TestSuite ( "Java5<seq2seq4repair_space>-<seq2seq4repair_space>binary<seq2seq4repair_space>weaving" ) ; suite . addTestSuite ( MigrationTests . class ) ; suite . addTest ( Ajc150Tests . suite ( ) ) ; suite . addTestSuite ( Ajc150TestsNoHarness . class ) ; suite . addTest ( AccBridgeMethods . suite ( ) ) ; suite . addTestSuite ( CovarianceTests . class ) ; suite . addTestSuite ( Enums . class ) ; <START_BUG> suite . addTestSuite ( Annotations . class ) ; <END_BUG> suite . addTestSuite ( AnnotationPointcutsTests . class ) ; suite . addTestSuite ( VarargsTests . class ) ; suite . addTestSuite ( AnnotationRuntimeTests . class ) ; suite . addTestSuite ( PerTypeWithinTests . class ) ; return suite ; } }

Fix:
suite . addTestSuite ( AnnotationsBinaryWeaving . class ) ;
Buggy code:
) ; public static void main ( String [ ] args ) throws EncodingException { } private static void processFaceStatus ( Blob encodedFaceStatus , final Name prefix , String uri , final Face face , final boolean [ ] enabled ) { } private static void processCreateFaceResponse ( Blob encodedControlResponse , Name prefix , Face face , final boolean [ ] enabled ) { } private static void registerRoute ( Name prefix , long faceId , Face face , final boolean [ ] enabled ) { long origin = 255 ; long cost = 0 ; final long CHILD_INHERIT = 1 ; long flags = CHILD_INHERIT ; try { ControlParametersMessage . Builder builder = ControlParametersMessage . newBuilder ( ) ; ControlParametersTypes . Name . Builder nameBuilder = builder . getControlParametersBuilder ( ) . getNameBuilder ( ) ; for ( int i = 0 ; i < ( prefix . size ( ) ) ; ++ i ) nameBuilder . addComponent ( ByteString . copyFrom ( prefix . get ( i ) . getValue ( ) . buf ( ) ) ) ; builder . getControlParametersBuilder ( ) . setFaceId ( faceId ) ; builder . getControlParametersBuilder ( ) . setOrigin ( origin ) ; builder . getControlParametersBuilder ( ) . setCost ( cost ) ; builder . getControlParametersBuilder ( ) . setFlags ( flags ) ; Blob encodedControlParameters = ProtobufTlv . encode ( builder . build ( ) ) ; Interest interest = new Interest ( new Name ( "//localhost//nfd//rib//register" ) ) ; interest . getName ( ) . append ( encodedControlParameters ) ; interest . setInterestLifetimeMilliseconds ( 10000 ) ; face . makeCommandInterest ( interest ) ; face . expressInterest ( interest , new OnData ( ) { public void onData ( Interest interest , Data data ) { enabled [ 0 ] = false ; TestRegisterRoute . processRegisterResponse ( data . getContent ( ) ) ; } } , new OnTimeout ( ) { public void onTimeout ( Interest interest ) { enabled [ 0 ] = false ; <START_BUG> System . out . println ( "Face<seq2seq4repair_space>create<seq2seq4repair_space>command<seq2seq4repair_space>timed<seq2seq4repair_space>out." ) ; <END_BUG> } } ) ; } catch ( Exception e ) { System . out . println ( ( "exception:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; enabled [ 0 ] = false ; } } private static void processRegisterResponse ( Blob encodedControlResponse ) { } }

Fix:
System . out . println ( "Register<seq2seq4repair_space>route<seq2seq4repair_space>command<seq2seq4repair_space>timed<seq2seq4repair_space>out." ) ;
Buggy code:
public class StreamFinishedVerbHandler implements IVerbHandler { private static Logger logger = LoggerFactory . getLogger ( StreamFinishedVerbHandler . class ) ; public void doVerb ( Message message ) { byte [ ] body = message . getMessageBody ( ) ; ByteArrayInputStream bufIn = new ByteArrayInputStream ( body ) ; try { <START_BUG> CompletedFileStatus streamStatus = CompletedFileStatus . serializer ( ) . deserialize ( new DataInputStream ( bufIn ) ) ; <END_BUG> switch ( streamStatus . getAction ( ) ) { case DELETE : StreamOutManager . get ( message . getFrom ( ) ) . finishAndStartNext ( streamStatus . getFile ( ) ) ; break ; case STREAM : if ( StreamFinishedVerbHandler . logger . isDebugEnabled ( ) ) StreamFinishedVerbHandler . logger . debug ( ( "Need<seq2seq4repair_space>to<seq2seq4repair_space>re-stream<seq2seq4repair_space>file<seq2seq4repair_space>" + ( streamStatus . getFile ( ) ) ) ) ; StreamOutManager . get ( message . getFrom ( ) ) . startNext ( ) ; break ; default : break ; } } catch ( IOException ex ) { throw new IOError ( ex ) ; } } }

Fix:
FileStatus streamStatus = FileStatus . serializer ( ) . deserialize ( new DataInputStream ( bufIn ) ) ;
Buggy code:
public class StrJoinTest { @ Test public void testStrJoin ( ) { } @ Test public void testStrJoinNull ( ) { } @ Test public void testError90780 ( ) { } @ Test public void testError90781 ( ) { } @ Test public void testManual ( ) { } private Array array ( List < Expression > expr ) { } private List < Expression > expr ( Object ... object ) { List < Expression > expr = new ArrayList < Expression > ( ) ; for ( Object o : object ) { if ( o == null ) <START_BUG> expr . add ( new NullConstant ( null , null ) ) ; <END_BUG> if ( o instanceof Expression ) expr . add ( ( ( Expression ) ( o ) ) ) ; else if ( o instanceof String ) expr . add ( new StringConstant ( ( ( String ) ( o ) ) ) ) ; else if ( o instanceof Number ) expr . add ( new NumberConstant ( ( ( Number ) ( o ) ) ) ) ; else if ( o instanceof Boolean ) expr . add ( new BooleanConstant ( ( ( Boolean ) ( o ) ) ) ) ; } return expr ; } }

Fix:
expr . add ( new NullConstant ( ) ) ;
Buggy code:
public class SystemPropertyAddHandler implements OperationStepHandler { public static final String OPERATION_NAME = ADD ; public static ModelNode getOperation ( ModelNode address , String value ) { } public static ModelNode getOperation ( ModelNode address , String value , Boolean boottime ) { } private final ProcessEnvironmentSystemPropertyUpdater systemPropertyUpdater ; private final boolean useBoottime ; private final AttributeDefinition [ ] attributes ; public SystemPropertyAddHandler ( ProcessEnvironmentSystemPropertyUpdater systemPropertyUpdater , boolean useBoottime , AttributeDefinition [ ] attributes ) { } @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final ModelNode model = context . createResource ( EMPTY_ADDRESS ) . getModel ( ) ; for ( AttributeDefinition attr : attributes ) { attr . validateAndSet ( operation , model ) ; } final String name = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) . getLastElement ( ) . getValue ( ) ; final String value = ( operation . hasDefined ( VALUE . getName ( ) ) ) ? operation . get ( VALUE . getName ( ) ) . asString ( ) : null ; final boolean applyToRuntime = ( ( systemPropertyUpdater ) != null ) && ( systemPropertyUpdater . isRuntimeSystemPropertyUpdateAllowed ( name , value , context . isBooting ( ) ) ) ; final boolean reload = ( ! applyToRuntime ) && ( context . getProcessType ( ) . isServer ( ) ) ; if ( applyToRuntime ) { <START_BUG> final String setValue = ( value != null ) ? VALUE . resolveModelAttribute ( context , operation ) . asString ( ) : null ; <END_BUG> if ( setValue != null ) { SecurityActions . setSystemProperty ( name , setValue ) ; } else { SecurityActions . clearSystemProperty ( name ) ; } if ( ( systemPropertyUpdater ) != null ) { systemPropertyUpdater . systemPropertyUpdated ( name , setValue ) ; } } else if ( reload ) { context . reloadRequired ( ) ; } context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { if ( reload ) { context . revertReloadRequired ( ) ; } if ( ( systemPropertyUpdater ) != null ) { SecurityActions . clearSystemProperty ( name ) ; if ( ( systemPropertyUpdater ) != null ) { systemPropertyUpdater . systemPropertyUpdated ( name , null ) ; } } } } ) ; } }

Fix:
final String setValue = ( value != null ) ? VALUE . resolveModelAttribute ( context , model ) . asString ( ) : null ;
Buggy code:
public class ValidateOperationOperationTestCase extends AbstractMgmtTestBase { private static final String MASTER = "master" ; private static final String SLAVE = "slave" ; private static final String MASTER_SERVER = "main-one" ; private static final String SLAVE_SERVER = "main-three" ; @ BeforeClass public static void initClient ( ) throws Exception { } @ AfterClass public static void closeClient ( ) throws Exception { } @ Test public void testValidRootOperation ( ) throws IOException , MgmtOperationException { } @ Test public void testFailedRootOperation ( ) throws IOException { } @ Test public void testValidDcOperation ( ) throws IOException , MgmtOperationException { } @ Test public void testInvalidDcOperation ( ) throws IOException { } @ Test public void testValidMasterHcOperation ( ) throws IOException , MgmtOperationException { } @ Test public void testValidSlaveHcOperation ( ) throws IOException , MgmtOperationException { } public void testValidHcOperation ( String host ) throws IOException , MgmtOperationException { } @ Test public void testInvalidMasterHcOperation ( ) throws IOException { } @ Test public void testInvalidSlaveHcOperation ( ) throws IOException { } private void testInvalidHcOperation ( String host ) throws IOException { } @ Test public void testValidMasterHcServerOperation ( ) throws IOException , MgmtOperationException { } @ Test public void testValidSlaveHcServerOperation ( ) throws IOException , MgmtOperationException { } private void testValidServerOperation ( String host , String server ) throws IOException , MgmtOperationException { } @ Test public void testInvalidMasterHcServerOperation ( ) throws IOException , MgmtOperationException { } @ Test public void testInvalidSlaveHcServerOperation ( ) throws IOException , MgmtOperationException { } private void testInvalidServerOperation ( String host , String server ) throws IOException , MgmtOperationException { } private ModelNode createValidateOperation ( ModelNode validatedOperation ) throws IOException { } private void executeInvalidOperation ( ModelNode operation ) throws IOException { try { executeOperation ( createValidateOperation ( operation ) ) ; <START_BUG> Assert . fail ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>failed<seq2seq4repair_space>on<seq2seq4repair_space>no<seq2seq4repair_space>required<seq2seq4repair_space>paramter<seq2seq4repair_space>included" ) ; <END_BUG> } catch ( MgmtOperationException expected ) { } } }

Fix:
Assert . fail ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>failed<seq2seq4repair_space>on<seq2seq4repair_space>no<seq2seq4repair_space>required<seq2seq4repair_space>parameter<seq2seq4repair_space>included" ) ;
Buggy code:
public abstract class IndexReaderFactory implements NamedListInitializedPlugin { protected int termInfosIndexDivisor = 1 ; public void init ( NamedList args ) { <START_BUG> Integer v = ( ( Integer ) ( args . get ( "termInfosIndexDivisor" ) ) ) ; <END_BUG> if ( v != null ) { termInfosIndexDivisor = v . intValue ( ) ; } } public int getTermInfosIndexDivisor ( ) { } public abstract IndexReader newReader ( Directory indexDir , boolean readOnly ) throws IOException { } }

Fix:
Integer v = ( ( Integer ) ( args . get ( "setTermIndexInterval" ) ) ) ;
Buggy code:
public class CDVBannerAd extends CDVHeyzapAbstractPlugin { private static final String TAG = "CDVBannerAd" ; private static final String POSITION_BOTTOM = "bottom" ; private static final String FACEBOOK_SIZE_PROPERTY = "facebookBannerSize" ; private static final String ADMOB_SIZE_PROPERTY = "admobBannerSize" ; private HashMap < String , CreativeSize > bannerSizes = new HashMap < String , CreativeSize > ( ) ; @ Override public void initialize ( CordovaInterface cordova , CordovaWebView webView ) { } public void show ( final JSONArray args , final CallbackContext callbackContext ) { } public void hide ( final JSONArray args , final CallbackContext callbackContext ) { } public void destroy ( final JSONArray args , final CallbackContext callbackContext ) { } public void dimensions ( final JSONArray args , final CallbackContext callbackContext ) { BannerAdView currentBannerAdView = BannerAd . getCurrentBannerAdView ( ) ; if ( ( currentBannerAdView != null ) && ( ( currentBannerAdView . getParent ( ) ) != null ) ) { JSONObject dimensions = new JSONObject ( ) ; try { dimensions . put ( "x" , currentBannerAdView . getLeft ( ) ) ; <START_BUG> dimensions . put ( "y" , currentBannerAdView . getRight ( ) ) ; <END_BUG> dimensions . put ( "width" , currentBannerAdView . getWidth ( ) ) ; dimensions . put ( "height" , currentBannerAdView . getHeight ( ) ) ; } catch ( JSONException e ) { String message = "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>current<seq2seq4repair_space>banner<seq2seq4repair_space>ad<seq2seq4repair_space>dimensions:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ; Log . e ( CDVBannerAd . TAG , message ) ; e . printStackTrace ( ) ; callbackContext . error ( message ) ; return ; } callbackContext . success ( dimensions ) ; } } @ Override public void setListener ( CDVListener listener ) { } private BannerOptions getOptions ( JSONObject jsonOptions ) { } }

Fix:
dimensions . put ( "y" , currentBannerAdView . getTop ( ) ) ;
Buggy code:
public class QualityMeasureDocumentStudyDefinition implements StudyDefinition { private final POQMMT000001UVQualityMeasureDocument qualityMeasureDocument ; private final DataService dataService ; public QualityMeasureDocumentStudyDefinition ( POQMMT000001UVQualityMeasureDocument qualityMeasureDocument , DataService dataService ) { } @ Override public String getId ( ) { } @ Override public void setId ( String id ) { } @ Override public String getName ( ) { } @ Override public void setName ( String name ) { } @ Override public String getDescription ( ) { } @ Override public String getVersion ( ) { } @ Override public Date getDateCreated ( ) { } @ Override public Status getStatus ( ) { } @ Override public List < CatalogItem > getItems ( ) { } @ Override public void setItems ( Iterable < CatalogItem > items ) { } @ Override public List < String > getAuthors ( ) { } @ Override public String getAuthorEmail ( ) { <START_BUG> return null ; <END_BUG> } @ Override public String getRequestProposalForm ( ) { } @ Override public boolean containsItem ( CatalogItem anItem ) { } }

Fix:
return qualityMeasureDocument . getAuthor ( ) . iterator ( ) . next ( ) . getAssignedPerson ( ) . getTelecom ( ) . get ( 0 ) . getValue ( ) ;
Buggy code:
public class CalculatorExpressionEvaluator { private final Solver mSolver ; private final CalculatorExpressionTokenizer mTokenizer ; public CalculatorExpressionEvaluator ( CalculatorExpressionTokenizer tokenizer ) { } public void evaluate ( CharSequence expr , CalculatorExpressionEvaluator . EvaluateCallback callback ) { } public void evaluate ( String expr , CalculatorExpressionEvaluator . EvaluateCallback callback ) { expr = mTokenizer . getNormalizedExpression ( expr ) ; while ( ( ( expr . length ( ) ) > 0 ) && ( ( "+-//*" . indexOf ( expr . charAt ( ( ( expr . length ( ) ) - 1 ) ) ) ) != ( - 1 ) ) ) { expr = expr . substring ( 0 , ( ( expr . length ( ) ) - 1 ) ) ; } try { if ( ( ( expr . length ( ) ) == 0 ) || ( ( Double . valueOf ( expr ) ) != null ) ) { callback . onEvaluate ( expr , null , INVALID_RES_ID ) ; return ; } } catch ( NumberFormatException e ) { } try { String result = mSolver . solve ( expr ) ; <START_BUG> callback . onEvaluate ( expr , result , INVALID_RES_ID ) ; <END_BUG> } catch ( SyntaxException e ) { callback . onEvaluate ( expr , null , error ) ; } } public void setBase ( String expr , Base base , CalculatorExpressionEvaluator . EvaluateCallback callback ) { } public Solver getSolver ( ) { } public interface EvaluateCallback { public void onEvaluate ( String expr , String result , int errorResourceId ) { } } No newline ; at end ; of file ; }

Fix:
callback . onEvaluate ( expr , mTokenizer . getLocalizedExpression ( result ) , INVALID_RES_ID ) ;
Buggy code:
public class TempFile extends Task { private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; private String property ; private File destDir = null ; private String prefix ; private String suffix = "" ; public void setProperty ( String property ) { } public void setDestDir ( File destDir ) { } public void setPrefix ( String prefix ) { } public void setSuffix ( String suffix ) { } public void execute ( ) throws BuildException { if ( ( ( property ) == null ) || ( ( property . length ( ) ) == 0 ) ) { throw new BuildException ( "no<seq2seq4repair_space>property<seq2seq4repair_space>specified" ) ; } if ( ( destDir ) == null ) { <START_BUG> destDir = getProject ( ) . resolveFile ( "." ) ; <END_BUG> } File tfile = TempFile . FILE_UTILS . createTempFile ( prefix , suffix , destDir ) ; getProject ( ) . setNewProperty ( property , tfile . toString ( ) ) ; } }

Fix:
destDir = TempFile . FILE_UTILS . resolveFile ( getProject ( ) . getBaseDir ( ) , "." ) ;
Buggy code:
public class DefaultConfiguration implements Configuration { private static final Logger LOG = Logger . getLogger ( DefaultConfiguration . class . getName ( ) ) ; private final ConfigurationContext configurationContext ; public DefaultConfiguration ( ConfigurationContext configurationContext ) { } @ Override public String get ( String key ) { } protected PropertyValue evaluteRawValue ( String key ) { } @ Override public String getOrDefault ( String key , String defaultValue ) { } @ Override public < T > T getOrDefault ( String key , Class < T > type , T defaultValue ) { } @ Override public Map < String , String > getProperties ( ) { } protected Map < String , String > evaluateUnfilteredMap ( ) { } @ Override public < T > T get ( String key , Class < T > type ) { } @ Override public < T > T get ( String key , TypeLiteral < T > type ) { } protected < T > T convertValue ( String key , String value , TypeLiteral < T > type ) { if ( value != null ) { List < PropertyConverter < T > > converters = configurationContext . getPropertyConverters ( type ) ; <START_BUG> ConversionContext context = new ConversionContext . Builder ( this , key , type ) . build ( ) ; <END_BUG> for ( PropertyConverter < T > converter : converters ) { try { T t = converter . convert ( value , context ) ; if ( t != null ) { return t ; } } catch ( Exception e ) { DefaultConfiguration . LOG . log ( Level . FINEST , ( ( ( "PropertyConverter:<seq2seq4repair_space>" + converter ) + "<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>convert<seq2seq4repair_space>value:<seq2seq4repair_space>" ) + value ) , e ) ; } } throw new org . apache . tamaya . ConfigException ( ( ( ( ( ( "Unparseable<seq2seq4repair_space>config<seq2seq4repair_space>value<seq2seq4repair_space>for<seq2seq4repair_space>type:<seq2seq4repair_space>" + ( type . getRawType ( ) . getName ( ) ) ) + ":<seq2seq4repair_space>" ) + key ) + ",<seq2seq4repair_space>supported<seq2seq4repair_space>formats:<seq2seq4repair_space>" ) + ( context . getSupportedFormats ( ) ) ) ) ; } return null ; } @ Override public < T > T getOrDefault ( String key , TypeLiteral < T > type , T defaultValue ) { } @ Override public Configuration with ( ConfigOperator operator ) { } @ Override public < T > T query ( ConfigQuery < T > query ) { } }

Fix:
ConversionContext context = new ConversionContext . Builder ( this , configurationContext , key , type ) . build ( ) ;
Buggy code:
public class XSLTProcess extends MatchingTask { private File destDir = null ; private File baseDir = null ; private File xslFile = null ; private String targetExtension = "html" ; private XSLTLiaison liaison ; public XSLTProcess ( ) { } public void execute ( ) throws BuildException { } public void setBasedir ( String dirName ) { } public void setDestdir ( String dirName ) { } public void setExtension ( String name ) { } public void setStyle ( String xslFile ) { } public void setProcessor ( String processor ) throws Exception { } private void process ( File baseDir , String xmlFile , File destDir ) throws BuildException { <START_BUG> String fileExt = ".html" ; <END_BUG> File outFile = null ; File inFile = null ; try { inFile = new File ( baseDir , xmlFile ) ; outFile = new File ( destDir , ( ( xmlFile . substring ( 0 , xmlFile . lastIndexOf ( '.' ) ) ) + fileExt ) ) ; if ( ( inFile . lastModified ( ) ) > ( outFile . lastModified ( ) ) ) { project . log ( ( ( ( "Processing<seq2seq4repair_space>" + xmlFile ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + outFile ) , MSG_VERBOSE ) ; liaison . transform ( inFile . toString ( ) , outFile . toString ( ) ) ; } } catch ( Exception ex ) { project . log ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>process<seq2seq4repair_space>" + inFile ) , MSG_INFO ) ; outFile . delete ( ) ; throw new BuildException ( ex ) ; } } }

Fix:
String fileExt = targetExtension ;
Buggy code:
public class FilePageStore implements IPageStore { protected static Logger log = LoggerFactory . getLogger ( FilePageStore . class ) ; private File defaultWorkDir ; public FilePageStore ( ) { } protected File getWorkDir ( ) { } public Page getPage ( String sessionId , int id , int versionNumber ) { } private File getPageFile ( int id , int versionNumber , File sessionDir ) { } public void removePage ( String sessionId , Page page ) { } public void storePage ( String sessionId , Page page ) { File sessionDir = new File ( getWorkDir ( ) , sessionId ) ; sessionDir . mkdirs ( ) ; File pageFile = getPageFile ( page . getNumericId ( ) , page . getCurrentVersionNumber ( ) , sessionDir ) ; <START_BUG> page . internalDetach ( ) ; <END_BUG> byte [ ] bytes = Objects . objectToByteArray ( page ) ; FileOutputStream fos = null ; try { fos = new FileOutputStream ( pageFile ) ; ByteBuffer bb = ByteBuffer . wrap ( bytes ) ; fos . getChannel ( ) . write ( bb ) ; } catch ( Exception e ) { FilePageStore . log . debug ( ( ( ( ( ( ( "Error<seq2seq4repair_space>saving<seq2seq4repair_space>page<seq2seq4repair_space>" + ( page . getId ( ) ) ) + "<seq2seq4repair_space>with<seq2seq4repair_space>version<seq2seq4repair_space>" ) + ( page . getCurrentVersionNumber ( ) ) ) + "<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>sessionid<seq2seq4repair_space>" ) + sessionId ) + "<seq2seq4repair_space>from<seq2seq4repair_space>disc" ) , e ) ; } finally { try { if ( fos != null ) { fos . close ( ) ; } } catch ( IOException ex ) { } } } public void unbind ( String sessionId ) { } }

Fix:
page . detach ( ) ;
Buggy code:
public class KheoUtils { public static List < String > getPluginsNames ( List < KheoPlugin < ? > > plugins ) { return Lists . transform ( plugins , new Function < KheoPlugin < ? > , String > ( ) { @ Override public String apply ( KheoPlugin < ? > plugin ) { <START_BUG> return ( plugin . getName ( ) ) + ( plugin . getVersion ( ) ) ; <END_BUG> } } ) ; } public static List < PluginDTO > convertPluginsToPluginDTO ( List < ? extends KheoPlugin < ? extends ServerProperty > > plugins ) { } }

Fix:
return plugin . getName ( ) ;
Buggy code:
public class DeploymentService implements Service < Void > { private static final Logger log = Logger . getLogger ( "org.jboss.as.deployment" ) ; public static final ServiceName SERVICE_NAME = JBOSS . append ( "deployment" ) ; private final Closeable deploymentMount ; public DeploymentService ( Closeable deploymentMount ) { } public static ServiceName getServiceName ( String deploymentName ) { <START_BUG> return DeploymentService . SERVICE_NAME . append ( deploymentName . replace ( '.' , '_' ) ) ; <END_BUG> } public void start ( StartContext context ) throws StartException { } public void stop ( StopContext context ) { } public Void getValue ( ) throws IllegalStateException { } }

Fix:
return DeploymentService . SERVICE_NAME . append ( deploymentName ) ;
Buggy code:
public class ImportWizardLauncher { public ImportWizardLauncher ( ) { } public void launchWizard ( ) { final ImportPluginHandler pluginHandler ; try { pluginHandler = ( ( ImportPluginHandler ) ( pluginManager . getHandler ( "org.columba.mail.import" ) ) ) ; } catch ( PluginHandlerNotFoundException ex ) { NotifyDialog d = new NotifyDialog ( ) ; d . showDialog ( ex ) ; return ; } DataModel data = new DataModel ( ) ; data . registerDataLookup ( "Plugin.handler" , new DataLookup ( ) { public Object lookupData ( ) { return pluginHandler ; } } ) ; WizardModel model = new net . javaprog . ui . wizard . DefaultWizardModel ( new Step [ ] { new PluginStep ( data ) , new LocationStep ( data ) } ) ; model . addWizardModelListener ( new MailboxImporter ( data ) ) ; <START_BUG> Wizard wizard = new Wizard ( model , MailResourceLoader . getString ( "dialog" , "mailboximport" , "title" ) , ImageLoader . getSmallImageIcon ( "stock_convert.png" ) ) ; <END_BUG> CSH . setHelpIDString ( wizard , "organising_and_managing_your_email_1" ) ; JavaHelpSupport . enableHelp ( wizard , HelpManager . getHelpBroker ( ) ) ; wizard . pack ( ) ; wizard . setLocationRelativeTo ( null ) ; wizard . setVisible ( true ) ; } }

Fix:
Wizard wizard = new Wizard ( model , MailResourceLoader . getString ( "dialog" , "mailboximport" , "title" ) , ImageLoader . getSmallImageIcon ( "stock_convert-32.png" ) ) ;
Buggy code:
public class EntityBeanComponentCreateService extends EJBComponentCreateService { private final Class < EJBHome > homeClass ; private final Class < EJBLocalHome > localHomeClass ; private final Class < EJBObject > remoteClass ; private final Class < EJBLocalObject > localClass ; private final Class < Object > primaryKeyClass ; private final Method ejbStoreMethod ; private final Method ejbLoadMethod ; private final Method ejbActivateMethod ; private final Method ejbPassivateMethod ; private final Method unsetEntityContextMethod ; private final InterceptorFactory ejbStore ; private final InterceptorFactory ejbLoad ; private final InterceptorFactory ejbActivate ; private final InterceptorFactory ejbPassivate ; private final InterceptorFactory unsetEntityContext ; private final InjectedValue < PoolConfig > poolConfig = new InjectedValue < PoolConfig > ( ) ; private final InjectedValue < Boolean > defaultOptimisticLocking = new InjectedValue < Boolean > ( ) ; public EntityBeanComponentCreateService ( final ComponentConfiguration componentConfiguration , final ApplicationExceptions ejbJarConfiguration ) { } private Class < ? > load ( ClassLoader classLoader , String ejbClass ) { if ( ejbClass != null ) { try { return classLoader . loadClass ( ejbClass ) ; } catch ( ClassNotFoundException e ) { <START_BUG> throw new RuntimeException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>component<seq2seq4repair_space>view<seq2seq4repair_space>class:<seq2seq4repair_space>" + ejbClass ) , e ) ; <END_BUG> } } return null ; } private static InterceptorFactory invokeMethodOnTarget ( final Method method ) { } @ Override protected BasicComponent createComponent ( ) { } public static final ComponentCreateServiceFactory FACTORY = new EJBComponentCreateServiceFactory ( ) { @ Override public BasicComponentCreateService constructService ( final ComponentConfiguration configuration ) { } } ; public Class < EJBHome > getHomeClass ( ) { } public Class < EJBLocalHome > getLocalHomeClass ( ) { } public Class < EJBObject > getRemoteClass ( ) { } public Class < EJBLocalObject > getLocalClass ( ) { } public Class < Object > getPrimaryKeyClass ( ) { } public Method getEjbStoreMethod ( ) { } public Method getEjbLoadMethod ( ) { } public Method getEjbActivateMethod ( ) { } public InterceptorFactory getEjbStore ( ) { } public InterceptorFactory getEjbLoad ( ) { } public InterceptorFactory getEjbActivate ( ) { } public Method getEjbPassivateMethod ( ) { } public InterceptorFactory getEjbPassivate ( ) { } public Method getUnsetEntityContextMethod ( ) { } public InterceptorFactory getUnsetEntityContext ( ) { } public PoolConfig getPoolConfig ( ) { } public InjectedValue < PoolConfig > getPoolConfigInjector ( ) { } public Boolean getOptimisticLocking ( ) { } public InjectedValue < Boolean > getOptimisticLockingInjector ( ) { } }

Fix:
throw new RuntimeException ( e ) ;
Buggy code:
public class CharSetUtil { private static final Log log = LogFactory . getLog ( CharSetUtil . class ) ; private static CharSetMap charSetMap ; public CharSetUtil ( ) { } private static final synchronized void initialize ( final WebApplication application ) { if ( ( CharSetUtil . charSetMap ) == null ) { <START_BUG> final ServletContext context = application . getWicketServlet ( ) . getServletContext ( ) ; <END_BUG> final InputStream inputStream = context . getResourceAsStream ( ( "//WEB-INF//" + ( CharSetMap . CHARSET_RESOURCE ) ) ) ; if ( inputStream == null ) { CharSetUtil . charSetMap = new CharSetMap ( ) ; if ( CharSetUtil . log . isDebugEnabled ( ) ) { CharSetUtil . log . debug ( ( ( "File<seq2seq4repair_space>'" + ( CharSetMap . CHARSET_RESOURCE ) ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ; } } else { try { CharSetUtil . charSetMap = new CharSetMap ( inputStream ) ; } catch ( IOException ex ) { throw new WicketRuntimeException ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>reading<seq2seq4repair_space>CharSetMap" , ex ) ; } } } } public static final String getEncoding ( final RequestCycle cycle ) { } }

Fix:
final ServletContext context = application . getServletContext ( ) ;
Buggy code:
public class JavaConfigGui extends AbstractConfigGui implements ActionListener { private static final long serialVersionUID = 240L ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private JComboBox classnameCombo ; private boolean displayName = true ; private ArgumentsPanel argsPanel ; public JavaConfigGui ( ) { } public JavaConfigGui ( boolean displayNameField ) { } @ Override public String getLabelResource ( ) { } private void init ( ) { } private JPanel createClassnamePanel ( ) { } @ Override public void actionPerformed ( ActionEvent evt ) { } private JPanel createParameterPanel ( ) { } @ Override public void configure ( TestElement config ) { super . configure ( config ) ; argsPanel . configure ( ( ( Arguments ) ( config . getProperty ( ARGUMENTS ) . getObjectValue ( ) ) ) ) ; String className = config . getPropertyAsString ( CLASSNAME ) ; if ( JavaConfigGui . checkContainsClassName ( classnameCombo . getModel ( ) , className ) ) { classnameCombo . setSelectedItem ( className ) ; } else { <START_BUG> JavaConfigGui . log . error ( ( ( ( ( "Error<seq2seq4repair_space>setting<seq2seq4repair_space>class:'" + className ) + "'<seq2seq4repair_space>in<seq2seq4repair_space>JavaSampler<seq2seq4repair_space>" ) + ( getName ( ) ) ) + ",<seq2seq4repair_space>check<seq2seq4repair_space>for<seq2seq4repair_space>a<seq2seq4repair_space>missing<seq2seq4repair_space>jar<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>jmeter<seq2seq4repair_space>classpath" ) ) ; <END_BUG> } } private static final boolean checkContainsClassName ( ComboBoxModel model , String className ) { } @ Override public TestElement createTestElement ( ) { } @ Override public void modifyTestElement ( TestElement config ) { } @ Override public void clearGui ( ) { } }

Fix:
JavaConfigGui . log . error ( ( ( ( ( "Error<seq2seq4repair_space>setting<seq2seq4repair_space>class:'" + className ) + "'<seq2seq4repair_space>in<seq2seq4repair_space>JavaSampler<seq2seq4repair_space>" ) + ( getName ( ) ) ) + ",<seq2seq4repair_space>check<seq2seq4repair_space>for<seq2seq4repair_space>a<seq2seq4repair_space>missing<seq2seq4repair_space>jar<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>jmeter<seq2seq4repair_space>'search_paths'<seq2seq4repair_space>and<seq2seq4repair_space>'plugin_dependency_paths'<seq2seq4repair_space>properties" ) ) ;
Buggy code:
public class OpenDirection { private String apiKey ; private String BASE_URL = "http:////open.mapquestapi.com//directions//v2//route?" ; private String jsonContent ; private String finalURL ; private DirectionNode [ ] directionNodes ; private double [ ] ulLatLng ; private double [ ] lrLatLng ; private double fuelUsed ; private int totalTime ; private double totalDistance ; private int [ ] maneuverPoints ; private double [ ] drawLatPoints ; private double [ ] drawLngPoints ; private int currentNode ; public OpenDirection ( String key ) { } public void setTrip ( String origin , String destination ) { } public void setTrip ( double oriLat , double oriLon , double destLat , double destLon ) { } public void downloadData ( ) { } private void parseData ( ) { } private void parseBoundingBox ( ) { } private void parseFuel ( ) { } private void parseTime ( ) { } private void parseDistance ( ) { } private void parseLegs ( ) { ArrayList < DirectionNode > directions = new ArrayList < DirectionNode > ( ) ; try { JSONObject jObject = new JSONObject ( jsonContent ) ; jObject = jObject . getJSONObject ( "route" ) ; JSONArray jArray = jObject . getJSONArray ( "legs" ) ; jObject = jArray . getJSONObject ( 0 ) ; jArray = jObject . getJSONArray ( "maneuvers" ) ; for ( int i = 0 ; i < ( jArray . length ( ) ) ; i ++ ) { jObject = jArray . getJSONObject ( i ) ; int index = jObject . getInt ( "index" ) ; <START_BUG> int manType = jObject . getInt ( "direction" ) ; <END_BUG> String direct = jObject . getString ( "narrative" ) ; double dist = jObject . getDouble ( "distance" ) ; int time = jObject . getInt ( "time" ) ; directions . add ( new DirectionNode ( manType , index , direct , dist , time ) ) ; } } catch ( JSONException e ) { directions = new ArrayList < DirectionNode > ( ) ; directions . add ( new DirectionNode ( 0 , 0 , "Error" , 0 , 0 ) ) ; System . out . println ( e . getMessage ( ) ) ; } directionNodes = directions . toArray ( new DirectionNode [ directions . size ( ) ] ) ; } private void parseManeuverPoints ( ) { } private void parseDrawingPoints ( ) { } public String getApiKey ( ) { } public String getBASE_URL ( ) { } public String getJsonContent ( ) { } public DirectionNode [ ] getDirectionNodes ( ) { } public double [ ] getUlLatLng ( ) { } public double [ ] getLrLatLng ( ) { } public double getFuelUsed ( ) { } public int getTotalTime ( ) { } public double getTotalDistance ( ) { } public int [ ] getManeuverPoints ( ) { } public double [ ] getDrawLatPoints ( ) { } public double [ ] getDrawLngPoints ( ) { } public int getPointCount ( ) { } public int getCurrentNode ( ) { } public void setCurrentNode ( int n ) { } public void incrementNode ( ) { } }

Fix:
int manType = jObject . getInt ( "turnType" ) ;
Buggy code:
public class RequestParameterTests { @ Test public void queryParameter ( ) throws Exception { <START_BUG> standaloneSetup ( new RequestParameterTests . PersonController ( ) ) . build ( ) . perform ( get ( "//search?name=George" ) . accept ( APPLICATION_JSON ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( content ( ) . mimeType ( "application//json;charset=UTF-8" ) ) . andExpect ( jsonPath ( "$.name" ) . value ( "George" ) ) ; <END_BUG> } @ Controller private class PersonController { @ RequestMapping ( "//search" ) @ ResponseBody public Person get ( @ RequestParam String name ) { } } }

Fix:
standaloneSetup ( new RequestParameterTests . PersonController ( ) ) . build ( ) . perform ( get ( "//search?name=George" ) . accept ( APPLICATION_JSON ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( content ( ) . contentType ( "application//json;charset=UTF-8" ) ) . andExpect ( jsonPath ( "$.name" ) . value ( "George" ) ) ;
Buggy code:
class CSSParser { public CSSParser ( ) { } public Hashtable < String , String > parse ( String css ) { XposedBridge . log ( "Parsing<seq2seq4repair_space>CSS" ) ; try { css = CSSParser . formatCSS ( css ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } Hashtable < String , String > emotes = new Hashtable < > ( ) ; boolean foundNewEmote = false ; String regex = "" ; String url ; for ( String line : css . split ( "\n" ) ) { if ( ! foundNewEmote ) { if ( line . contains ( "content:" ) ) { foundNewEmote = true ; regex = line . substring ( ( ( line . indexOf ( ':' ) ) + 2 ) , line . lastIndexOf ( "\"" ) ) ; } else if ( line . contains ( "background:" ) ) { <START_BUG> emotes . put ( "=====badge=====" , "http:////cdn.frankerfacez.com//icon32.png" ) ; <END_BUG> } } if ( foundNewEmote ) { if ( line . contains ( "background-image:" ) ) { url = line . substring ( ( ( line . indexOf ( "\"" ) ) + 1 ) , line . lastIndexOf ( "\"" ) ) ; emotes . put ( regex , url ) ; foundNewEmote = false ; } } } return emotes ; } private static String formatCSS ( String css ) { } }

Fix:
emotes . put ( "=====badge=====" , "http:////stdsbot.com//ffzdonormobile.png" ) ;
Buggy code:
public abstract class AbstractPropertyModel extends AbstractDetachableModel { private transient AbstractPropertyModel . ConversionContext conversionContext ; private Object nestedModel ; public AbstractPropertyModel ( final Object modelObject ) { } public final IModel getNestedModel ( ) { } protected Object modelObject ( final Component component ) { } protected abstract String ognlExpression ( Component component ) { } protected void onAttach ( ) { } protected void onDetach ( ) { } protected Object onGetObject ( final Component component ) { final String expression = ognlExpression ( component ) ; if ( Strings . isEmpty ( expression ) ) { return modelObject ( component ) ; } final Object modelObject = modelObject ( component ) ; if ( modelObject != null ) { try { prepareContext ( component ) ; return Ognl . getValue ( expression , conversionContext , modelObject , propertyType ( component ) ) ; } catch ( OgnlException e ) { <START_BUG> throw new wicket . WicketRuntimeException ( ( ( ( ( "OGNL<seq2seq4repair_space>Exception:<seq2seq4repair_space>expression='" + expression ) + "';<seq2seq4repair_space>component='" ) + ( component . getPath ( ) ) ) + "'" ) , e ) ; <END_BUG> } } return null ; } protected void onSetObject ( final Component component , Object object ) { } protected abstract Class propertyType ( Component component ) { } private final void prepareContext ( final Component component ) { } private static final class ConversionContext extends OgnlContext { Component component ; ConversionContext ( ) { } private final class TypeConverter extends DefaultTypeConverter { public Object convertValue ( Map context , Object value , Class toType ) { } public Object convertValue ( Map context , Object target , Member member , String propertyName , Object value , Class toType ) { } } } }

Fix:
throw new wicket . WicketRuntimeException ( ( ( ( ( "OGNL<seq2seq4repair_space>Exception:<seq2seq4repair_space>expression='" + expression ) + "';<seq2seq4repair_space>path='" ) + ( component . getPath ( ) ) ) + "'" ) , e ) ;
Buggy code:
public class ValueElement extends AbstractJsonObject { public JsonValue value ; public AbstractJsonObject parent ; public ValueElement ( JsonValue value , AbstractJsonObject parent ) { } @ Override public double similarity ( IElement anotherElement ) { } @ Override public String getText ( ) { <START_BUG> return ( ( ( this . parent . getText ( ) ) + "<seq2seq4repair_space>-><seq2seq4repair_space>(value<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( this . value ) ) + ")" ; <END_BUG> } @ Override public int getMaxDependencies ( String dependencyID ) { } @ Override public int getMinDependencies ( String dependencyID ) { } }

Fix:
return ( ( ( this . parent . getText ( ) ) + "_(value<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( this . value ) ) + ")" ;
Buggy code:
public class KidActByStudentComparator implements Comparator < KidAct > { @ Override public int compare ( KidAct o1 , KidAct o2 ) { if ( o1 == o2 ) { return 0 ; } else if ( ( o1 . getGrade ( ) . compareTo ( o2 . getGrade ( ) ) ) == 1 ) { return 1 ; } else if ( ( o1 . getGrade ( ) . compareTo ( o2 . getGrade ( ) ) ) == ( - 1 ) ) { return - 1 ; } if ( ( o1 . getTeacher ( ) . compareTo ( o2 . getTeacher ( ) ) ) == 1 ) { return 1 ; } else if ( ( o1 . getTeacher ( ) . compareTo ( o2 . getTeacher ( ) ) ) == ( - 1 ) ) { return - 1 ; } <START_BUG> return o1 . getTeacher ( ) . compareTo ( o2 . getTeacher ( ) ) ; <END_BUG> } }

Fix:
return o1 . getName ( ) . compareTo ( o2 . getName ( ) ) ;