nus-yam/ex-repair huggingface dataset:
Buggy code:
public class AntiShareListener implements Listener { private AntiShare plugin ; private HashMap < Player , Long > blockDropTextWarnings = new HashMap < Player , Long > ( ) ; public AntiShareListener ( AntiShare p ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onBlockBreak ( BlockBreakEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onBlockDamage ( BlockDamageEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onBlockPlace ( BlockPlaceEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onEntityDamage ( EntityDamageEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onEntityDeath ( EntityDeathEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onEntityTarget ( EntityTargetEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onPlayerCommand ( PlayerCommandPreprocessEvent event ) { if ( event . isCancelled ( ) ) { return ; } Player sender = event . getPlayer ( ) ; if ( sender . hasPermission ( "AntiShare.allow.commands" ) ) { return ; } if ( plugin . getConfig ( ) . getBoolean ( "other.only_if_creative" ) ) { if ( ( sender . getGameMode ( ) ) != ( GameMode . CREATIVE ) ) { return ; } } String [ ] commandsToBlock = plugin . getConfig ( ) . getString ( "events.commands" ) . split ( "<seq2seq4repair_space>" ) ; String commandSent = event . getMessage ( ) ; for ( String check : commandsToBlock ) { <START_BUG> if ( check . equalsIgnoreCase ( ( "//" + commandSent ) ) ) { <END_BUG> sender . sendMessage ( ASUtils . addColor ( plugin . getConfig ( ) . getString ( "messages.illegalCommand" ) ) ) ; event . setCancelled ( true ) ; return ; } } } @ EventHandler ( priority = EventPriority . LOWEST ) public void onPlayerDropItem ( PlayerDropItemEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onPlayerGameModeChange ( PlayerGameModeChangeEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onPlayerInteract ( PlayerInteractEvent event ) { } @ EventHandler ( priority = EventPriority . LOWEST ) public void onPlayerTeleport ( PlayerTeleportEvent event ) { } }

Fix:
if ( check . equalsIgnoreCase ( commandSent ) ) {
Buggy code:
public interface Verifier { <START_BUG> byte verify ( RRset set , Cache cache ) ; <END_BUG> }

Fix:
int verify ( RRset set , Cache cache ) ;
Buggy code:
public abstract class AbstractStoryActivity extends Activity implements AlertDialog . OnClickListener { public static final String EXTRA_STORY = "EXTRA_STORY" ; public static final String EXTRA_TAG = "TAG" ; protected Story story ; protected StoryTag tag ; protected String tagId ; protected StoryApplication storyApplication ; protected StoryHistory storyHistory ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } protected void setTagDescription ( ) { } @ Override public void onBackPressed ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onMenuItemSelected ( int featureId , MenuItem item ) { } public void saveStory ( ) { } private boolean hasNotFinishedTheFirstTag ( ) { <START_BUG> return ( storyHistory . getSize ( ) ) == 0 ; <END_BUG> } private boolean isStartTag ( ) { } private void quitStory ( ) { } @ Override public void onClick ( DialogInterface dialog , int which ) { } }

Fix:
return ( storyHistory . getSize ( ) ) == 1 ;
Buggy code:
@ ManagedBean ( name = "spottingActivityBean2" ) @ ViewScoped public class SpottingActivityBean2 implements Serializable { private ActivityVo activity ; private Integer idSequence ; private DocumentTexte text ; private final String [ ] colorRef = new String [ ] { "black" , "red" , "lime<seq2seq4repair_space>" , "blue" , "purple" , "deeppink" , "goldenrod" } ; private final String [ ] colorCoRef = new String [ ] { "black" , "orange" , "greenyellow" , "SkyBlue" , "orchid" , "hotpink" , "gold" } ; private Referent referent1 ; private Referent referent2 ; private List < Coreferent > coreferent1 ; private List < Coreferent > coreferent3 ; private final String R3 = "r3" ; private final String R2 = "r2" ; private final String R1 = "r1" ; private int rightAnswers ; public void preRenderView ( ) throws Exception { } private void initElements ( ) { } public List < ElementXML > getTitleElems ( ) { List < ElementXML > elems = new ArrayList < ElementXML > ( ) ; <START_BUG> if ( ( text ) != null ) { <END_BUG> List < Phrase > phrases = text . getContenu ( ) . getTitre ( ) . getPhrase ( ) ; for ( Phrase phrase : phrases ) { addPhraseElems ( phrase , elems ) ; } } return elems ; } private void addPhraseElems ( Phrase phrase , List < ElementXML > elems ) { } private List < ElementXML > getPropElems ( ElementXML prop ) { } public List < ElementXML > getSubtitleElems ( ElementXML subtitle ) { } public List < ElementXML > getParagraphElems ( ElementXML paragraph ) { } public String getElementsFromReferent ( ElementXML element ) { } public String getRefColor ( String idn ) { } public String getCoRefColor ( String ref , String idn ) { } public boolean isDraggable ( String chaine , boolean isRef ) { } public ActivityVo getActivity ( ) { } public void setActivity ( ActivityVo activity ) { } public Integer getIdSequence ( ) { } public void setIdSequence ( Integer idSequence ) { } public DocumentTexte getText ( ) { } public void setText ( DocumentTexte text ) { } public Referent getReferent1 ( ) { } public void setReferent1 ( Referent referent1 ) { } public Referent getReferent2 ( ) { } public void setReferent2 ( Referent referent2 ) { } public List < Coreferent > getCoreferent1 ( ) { } public void setCoreferent1 ( List < Coreferent > coreferent1 ) { } public List < Coreferent > getCoreferent3 ( ) { } public void setCoreferent3 ( List < Coreferent > coreferent3 ) { } public String getR3 ( ) { } public String getR2 ( ) { } public String getR1 ( ) { } public int getRightAnswers ( ) { } }

Fix:
if ( ( ( text ) != null ) && ( ( text . getContenu ( ) . getTitre ( ) ) != null ) ) {
Buggy code:
public class Forklift implements AutoCommand { private final int level ; public Forklift ( int level ) { } @ Override public void initialize ( ) { } @ Override public boolean tick ( ) { if ( ! ( forklift . isLevelReached ( ) ) ) { <START_BUG> forklift . update ( ) ; <END_BUG> return true ; } return false ; } @ Override public void cleanup ( ) { } }

Fix:
forklift . pidLoop ( ) ;
Buggy code:
public class SignJar extends Task { protected File jar ; protected String alias ; protected File keystore ; protected String storepass ; protected String storetype ; protected String keypass ; protected File sigfile ; protected File signedjar ; protected boolean verbose ; protected boolean internalsf ; protected boolean sectionsonly ; protected Vector filesets = new Vector ( ) ; protected boolean lazy ; public void setJar ( final File jar ) { } public void setAlias ( final String alias ) { } public void setKeystore ( final File keystore ) { } public void setStorepass ( final String storepass ) { } public void setStoretype ( final String storetype ) { } public void setKeypass ( final String keypass ) { } public void setSigfile ( final File sigfile ) { } public void setSignedjar ( final File signedjar ) { } public void setVerbose ( final boolean verbose ) { } public void setInternalsf ( final boolean internalsf ) { } public void setSectionsonly ( final boolean sectionsonly ) { } public void setLazy ( final boolean lazy ) { } public void addFileset ( final FileSet set ) { } public void execute ( ) throws BuildException { if ( ( null == ( jar ) ) && ( null == ( filesets ) ) ) { throw new BuildException ( "jar<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set<seq2seq4repair_space>through<seq2seq4repair_space>jar<seq2seq4repair_space>attribute<seq2seq4repair_space>or<seq2seq4repair_space>nested<seq2seq4repair_space>filesets" ) ; } if ( null != ( jar ) ) { doOneJar ( jar , signedjar ) ; return ; } else { for ( int i = 0 ; i < ( filesets . size ( ) ) ; i ++ ) { FileSet fs = ( ( FileSet ) ( filesets . elementAt ( i ) ) ) ; DirectoryScanner ds = fs . getDirectoryScanner ( project ) ; String [ ] jarFiles = ds . getIncludedFiles ( ) ; for ( int j = 0 ; j < ( jarFiles . length ) ; j ++ ) { <START_BUG> doOneJar ( new File ( jarFiles [ j ] ) , null ) ; <END_BUG> } } } } private void doOneJar ( File jarSource , File jarTarget ) throws BuildException { } protected boolean isUpToDate ( File jarFile , File signedjarFile ) { } protected boolean isSigned ( File file ) { } }

Fix:
doOneJar ( new File ( fs . getDir ( project ) , jarFiles [ j ] ) , null ) ;
Buggy code:
@ SuppressWarnings ( "deprecation" ) class WorldMySQLRegionManager implements WorldRegionManager { private String url = ( "jdbc:mysql:////" + ( RPConfig . getString ( "mysql.host" ) ) ) + "//" ; private String reconnect = "?autoReconnect=true" ; private String dbname ; private boolean dbexists = false ; private Connection dbcon ; private HashMap < String , Region > regions ; private World world ; public WorldMySQLRegionManager ( World world ) { } private boolean checkDBExists ( ) { } private void addNewColumns ( ) { } @ Override public void remove ( Region r ) { } private void removeLiveRegion ( Region r ) { } @ Override public void add ( Region r ) { } private void addLiveRegion ( Region r ) { } @ Override public void removeLiveFlags ( String rname , String flag ) { } @ Override public void updateLiveRegion ( String rname , String columm , String value ) { } @ Override public void updateLiveFlags ( String rname , String flag , String value ) { } @ Override public void load ( ) { } @ Override public Set < Region > getRegions ( String uuid ) { Set < Region > regionsp = new HashSet < Region > ( ) ; try { Statement st = this . dbcon . createStatement ( ) ; <START_BUG> ResultSet rs = st . executeQuery ( ( ( "SELECT<seq2seq4repair_space>name<seq2seq4repair_space>FROM<seq2seq4repair_space>region<seq2seq4repair_space>WHERE<seq2seq4repair_space>leaders<seq2seq4repair_space>LIKE<seq2seq4repair_space>='%" + uuid ) + "%'" ) ) ; <END_BUG> while ( rs . next ( ) ) { regionsp . add ( this . getRegion ( rs . getString ( "name" ) ) ) ; } st . close ( ) ; rs . close ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } return regionsp ; } @ Override public Set < Region > getMemberRegions ( String uuid ) { } @ Override public Region getRegion ( final String rname ) { } @ Override public int save ( ) { } @ Override public int getTotalRegionSize ( String uuid ) { } @ Override public Set < Region > getRegionsNear ( Player player , int radius ) { } private boolean regionExists ( String name ) { } private boolean flagExists ( String rname , String flag ) { } public World getWorld ( ) { } @ Override public Set < Region > getRegions ( int x , int y , int z ) { } @ Override public Region getTopRegion ( int x , int y , int z ) { } @ Override public Region getLowRegion ( int x , int y , int z ) { } public Map < Integer , Region > getGroupRegion ( int x , int y , int z ) { } @ Override public Set < Region > getAllRegions ( ) { } @ Override public void clearRegions ( ) { } @ Override public void closeConn ( ) { } private boolean ConnectDB ( ) { } @ Override public int getTotalRegionNum ( ) { } }

Fix:
ResultSet rs = st . executeQuery ( ( ( "SELECT<seq2seq4repair_space>name<seq2seq4repair_space>FROM<seq2seq4repair_space>region<seq2seq4repair_space>WHERE<seq2seq4repair_space>leaders<seq2seq4repair_space>LIKE<seq2seq4repair_space>'%" + uuid ) + "%'" ) ) ;
Buggy code:
public class DSServiceMyDrugref extends DSService { private static final Logger logger = MiscUtils . getLogger ( ) ; @ Autowired private UserPropertyDAO userPropertyDAO ; public DSServiceMyDrugref ( ) { } public void fetchGuidelinesFromService ( String providerNo ) { } public List < DSGuideline > fetchGuidelines ( List < String > uuids ) { RxMyDrugrefInfoAction myDrugrefAction = new RxMyDrugrefInfoAction ( ) ; Vector params = new Vector ( ) ; params . addElement ( new Vector ( uuids ) ) ; Vector < Hashtable > fetchedGuidelines = ( ( Vector < Hashtable > ) ( myDrugrefAction . callWebserviceLite ( "GetGuidelines" , params ) ) ) ; ArrayList < DSGuideline > newGuidelines = new ArrayList < DSGuideline > ( ) ; for ( Hashtable < String , Serializable > fetchedGuideline : fetchedGuidelines ) { DSServiceMyDrugref . logger . debug ( ( "Title:<seq2seq4repair_space>" + ( ( String ) ( fetchedGuideline . get ( "name" ) ) ) ) ) ; DSServiceMyDrugref . logger . debug ( ( "Author:<seq2seq4repair_space>" + ( ( String ) ( fetchedGuideline . get ( "author" ) ) ) ) ) ; DSServiceMyDrugref . logger . debug ( ( "UUID:<seq2seq4repair_space>" + ( ( String ) ( fetchedGuideline . get ( "uuid" ) ) ) ) ) ; DSServiceMyDrugref . logger . debug ( ( "Version:<seq2seq4repair_space>" + ( ( String ) ( fetchedGuideline . get ( "version" ) ) ) ) ) ; DSGuidelineFactory factory = new DSGuidelineFactory ( ) ; DSGuideline newGuideline = factory . createBlankGuideline ( ) ; try { newGuideline . setUuid ( ( ( String ) ( fetchedGuideline . get ( "uuid" ) ) ) ) ; newGuideline . setTitle ( ( ( String ) ( fetchedGuideline . get ( "name" ) ) ) ) ; newGuideline . setVersion ( Integer . parseInt ( ( ( String ) ( fetchedGuideline . get ( "version" ) ) ) ) ) ; newGuideline . setAuthor ( ( ( String ) ( fetchedGuideline . get ( "author" ) ) ) ) ; newGuideline . setXml ( ( ( String ) ( fetchedGuideline . get ( "body" ) ) ) ) ; newGuideline . setSource ( "mydrugref" ) ; newGuideline . setDateStart ( new Date ( ) ) ; newGuideline . setStatus ( 'A' ) ; newGuideline . setXml ( ( ( String ) ( fetchedGuideline . get ( "body" ) ) ) ) ; newGuidelines . add ( newGuideline ) ; newGuideline . parseFromXml ( ) ; } catch ( Exception e ) { DecisionSupportException newException = new DecisionSupportException ( ( ( ( ( "Error<seq2seq4repair_space>parsing<seq2seq4repair_space>drug<seq2seq4repair_space>with<seq2seq4repair_space>with<seq2seq4repair_space>title:<seq2seq4repair_space>'" + ( ( String ) ( fetchedGuideline . get ( "name" ) ) ) ) + "'<seq2seq4repair_space>uuid:<seq2seq4repair_space>'" ) + ( ( String ) ( fetchedGuideline . get ( "uuid" ) ) ) ) + "'" ) , e ) ; <START_BUG> DSServiceMyDrugref . logger . error ( "Error" , newException ) ; <END_BUG> newGuideline . setStatus ( 'F' ) ; newGuideline . setDateDecomissioned ( new Date ( ) ) ; } } return newGuidelines ; } public String getMyDrugrefId ( String providerNo ) { } public void setUserPropertyDAO ( UserPropertyDAO userPropertyDAO ) { } }

Fix:
DSServiceMyDrugref . logger . error ( newException . getMessage ( ) ) ;
Buggy code:
@ SuppressLint ( "ValidFragment" ) public class SplashFragment extends Fragment { public TextView mCardNameTv ; private ImageView mTopLogoIv ; private ImageView mBottomLogoIv ; private View v ; private RelativeLayout mTopRl ; static int pageNo ; int mCurrentPage ; int mListLength ; Context mContext = null ; public Card mCard ; public Integer [ ] imgArray ; public String [ ] titleArray ; SplashActivity mainObj ; public SplashFragment ( ) { } public SplashFragment ( Context mContext ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { Bundle data = getArguments ( ) ; if ( data != null ) { mCurrentPage = data . getInt ( "current_page" , 0 ) ; mCard = ( ( Card ) ( data . getSerializable ( "Card" ) ) ) ; mListLength = data . getInt ( "CardListLength" , 0 ) ; } v = inflater . inflate ( splash_fragment_row , container , false ) ; mTopLogoIv = ( ( ImageView ) ( v . findViewById ( cardIv ) ) ) ; mBottomLogoIv = ( ( ImageView ) ( v . findViewById ( cardBottomIv ) ) ) ; mCardNameTv = ( ( TextView ) ( v . findViewById ( cardName ) ) ) ; mTopRl = ( ( RelativeLayout ) ( v . findViewById ( cardBgRl ) ) ) ; if ( ( mCard ) != null ) { if ( ( mCurrentPage ) == ( mListLength ) ) { mTopRl . setBackgroundResource ( selector_splashcard_add ) ; mTopLogoIv . setVisibility ( GONE ) ; mCardNameTv . setVisibility ( GONE ) ; mBottomLogoIv . setVisibility ( GONE ) ; mTopRl . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { CardEntryDialog cardEntryDialog = new CardEntryDialog ( getActivity ( ) ) ; cardEntryDialog . show ( ) ; } } ) ; } else { mTopLogoIv . setVisibility ( VISIBLE ) ; mCardNameTv . setVisibility ( VISIBLE ) ; mBottomLogoIv . setVisibility ( VISIBLE ) ; mCardNameTv . setText ( mCard . getCardDisplayString ( ) ) ; Resources res = getResources ( ) ; mBottomLogoIv . setImageResource ( ( ( mCard . cardNetwork ) == ( CardNetwork . MASTER ) ? drawable . logo_mastercard : drawable . logo_visa ) ) ; mTopRl . setBackgroundResource ( ( ( ( mCurrentPage ) % 3 ) == 0 ? drawable . selector_splashcard_1 : ( ( mCurrentPage ) % 3 ) == 1 ? drawable . selector_splashcard_2 : drawable . selector_splashcard_3 ) ) ; mTopRl . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { <START_BUG> PreferanceUtil preferanceUtil = new PreferanceUtil ( mContext ) ; <END_BUG> preferanceUtil . setCardDetail ( mCard ) ; SingletonClass . sharedInstance ( ) . setCard ( mCard ) ; Intent intent = new Intent ( getActivity ( ) , HomeActivity . class ) ; intent . putExtra ( "ActivityName" , "Splash" ) ; startActivity ( intent ) ; } } ) ; } } return v ; } @ Override public void onPause ( ) { } @ Override public void onResume ( ) { } }

Fix:
PreferanceUtil preferanceUtil = new PreferanceUtil ( getActivity ( ) ) ;
Buggy code:
public class Maaaaaaster extends Treasure { public Maaaaaaster ( Game game ) { } @ Override public void cardInHand ( ) { this . setGold ( 0 ) ; <START_BUG> if ( ! ( this . ownedBy . getFaction ( ) . equals ( Cultist ) ) ) { <END_BUG> this . disable ( ) ; } } @ Override public void cardInPlay ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ! ( this . getOwner ( ) . getFaction ( ) . equals ( Cultist ) ) ) {
Buggy code:
public class ContinueStatement extends BranchStatement { public ContinueStatement ( char [ ] label , int sourceStart , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { FlowContext targetContext = ( ( label ) == null ) ? flowContext . getTargetContextForDefaultContinue ( ) : flowContext . getTargetContextForContinueLabel ( label ) ; if ( targetContext == null ) { if ( ( label ) == null ) { currentScope . problemReporter ( ) . invalidContinue ( this ) ; } else { currentScope . problemReporter ( ) . undefinedLabel ( this ) ; } return flowInfo ; } if ( targetContext == ( FlowContext . NotContinuableContext ) ) { currentScope . problemReporter ( ) . invalidContinue ( this ) ; return flowInfo ; } targetLabel = targetContext . continueLabel ( ) ; FlowContext traversedContext = flowContext ; int subIndex = 0 ; int maxSub = 5 ; subroutines = new SubRoutineStatement [ maxSub ] ; do { SubRoutineStatement sub ; if ( ( sub = traversedContext . subRoutine ( ) ) != null ) { if ( subIndex == maxSub ) { System . arraycopy ( subroutines , 0 , ( subroutines = new SubRoutineStatement [ maxSub *= 2 ] ) , 0 , subIndex ) ; } subroutines [ ( subIndex ++ ) ] = sub ; if ( sub . isSubRoutineEscaping ( ) ) { break ; } } traversedContext . recordReturnFrom ( flowInfo . unconditionalInits ( ) ) ; ASTNode node ; if ( ( node = traversedContext . associatedNode ) instanceof TryStatement ) { TryStatement tryStatement = ( ( TryStatement ) ( node ) ) ; flowInfo . addInitializationsFrom ( tryStatement . subRoutineInits ) ; } else if ( traversedContext == targetContext ) { <START_BUG> targetContext . recordContinueFrom ( flowInfo ) ; <END_BUG> break ; } } while ( ( traversedContext = traversedContext . parent ) != null ) ; if ( subIndex != maxSub ) { System . arraycopy ( subroutines , 0 , ( subroutines = new SubRoutineStatement [ subIndex ] ) , 0 , subIndex ) ; } return FlowInfo . DEAD_END ; } public StringBuffer printStatement ( int tab , StringBuffer output ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
targetContext . recordContinueFrom ( flowContext , flowInfo ) ;
Buggy code:
public final class SendCommandController extends AbstractRestController { private transient NodeController nodeManager ; private static final Logger LOGGER = Logger . getLogger ( SendCommandController . class ) ; public SendCommandController ( ) { } public void setNodeManager ( final NodeController nodeManager ) { } protected ModelAndView handle ( final HttpServletRequest request , final HttpServletResponse response , final Object commandObj , final BindException errors ) throws NodeNotFoundException , IOException { SendCommandController . LOGGER . info ( ( "Remote<seq2seq4repair_space>address:<seq2seq4repair_space>" + ( request . getRemoteAddr ( ) ) ) ) ; SendCommandController . LOGGER . info ( ( "Remote<seq2seq4repair_space>host:<seq2seq4repair_space>" + ( request . getRemoteHost ( ) ) ) ) ; final DestinationPayloadCommand command = ( ( DestinationPayloadCommand ) ( commandObj ) ) ; final String payload = command . getPayload ( ) . replaceAll ( "," , "" ) ; final String nodeId = payload . substring ( 3 ) ; if ( command . getDestination ( ) . contains ( "494" ) ) { UberLogger . getInstance ( ) . log ( nodeId , "T81" ) ; } final Node destinationNode = nodeManager . getByID ( command . getDestination ( ) ) ; if ( destinationNode == null ) { throw new NodeNotFoundException ( ( ( "Destination<seq2seq4repair_space>Node<seq2seq4repair_space>[" + ( command . getDestination ( ) ) ) + "]<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>stored." ) ) ; } if ( command . getDestination ( ) . contains ( "494" ) ) { UberLogger . getInstance ( ) . log ( nodeId , "T82" ) ; } final Socket kkSocket = new Socket ( "gold.cti.gr" , 4444 ) ; final PrintWriter out = new PrintWriter ( kkSocket . getOutputStream ( ) , true ) ; <START_BUG> final CommandProtocol . Command cmd = Command . newBuilder ( ) . setDestination ( command . getDestination ( ) ) . setPayload ( ByteString . copyFromUtf8 ( command . getPayload ( ) ) ) . build ( ) ; <END_BUG> cmd . writeTo ( kkSocket . getOutputStream ( ) ) ; out . close ( ) ; kkSocket . close ( ) ; if ( command . getDestination ( ) . contains ( "494" ) ) { UberLogger . getInstance ( ) . log ( nodeId , "T83" ) ; } response . setContentType ( "text//plain" ) ; final Writer textOutput = response . getWriter ( ) ; textOutput . write ( ( ( ( "OK<seq2seq4repair_space>.<seq2seq4repair_space>Destination<seq2seq4repair_space>:<seq2seq4repair_space>" + ( command . getDestination ( ) ) ) + "\nPayload<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( command . getPayload ( ) ) ) ) ; if ( command . getDestination ( ) . contains ( "494" ) ) { UberLogger . getInstance ( ) . log ( nodeId , "T84" ) ; } return null ; } }

Fix:
final CommandProtocol . Command cmd = Command . newBuilder ( ) . setDestination ( command . getDestination ( ) ) . setPayload ( command . getPayload ( ) ) . build ( ) ;
Buggy code:
public class ShortenerURLJUnitTest { JSONObject inviteData = new JSONObject ( ) ; String longURL ; String shortURL ; public ShortenerURLJUnitTest ( ) { } @ BeforeClass public static void setUpClass ( ) { } @ AfterClass public static void tearDownClass ( ) { } @ Before public void setUp ( ) throws UnsupportedEncodingException { } @ After public void tearDown ( ) { } @ Test public void getShortURLTest ( ) { <START_BUG> assertTrue ( ShortenerURL . getShortURL ( "" ) . equals ( "" ) ) ; <END_BUG> assertNotNull ( shortURL ) ; assertFalse ( longURL . equals ( shortURL ) ) ; assertTrue ( shortURL . substring ( 0 , 14 ) . equals ( "http:////goo.gl//" ) ) ; } @ Test public void getURLJSONObjectTest ( ) { } @ Test public void getClicksShortURLTest ( ) { } @ Test public void getLongURLTest ( ) { } }

Fix:
assertNull ( ShortenerURL . getShortURL ( "" ) ) ;
Buggy code:
public class ResolvedMember extends Member implements AnnotatedElement , IHasPosition { public String [ ] parameterNames = null ; protected TypeX [ ] checkedExceptions = TypeX . NONE ; protected int start ; protected int end ; protected ISourceContext sourceContext = null ; public ResolvedMember ( Kind kind , TypeX declaringType , int modifiers , TypeX returnType , String name , TypeX [ ] parameterTypes ) { } public ResolvedMember ( Kind kind , TypeX declaringType , int modifiers , TypeX returnType , String name , TypeX [ ] parameterTypes , TypeX [ ] checkedExceptions ) { } public ResolvedMember ( Kind kind , TypeX declaringType , int modifiers , String name , String signature ) { } public static final ResolvedMember [ ] NONE = new ResolvedMember [ 0 ] ; public final int getModifiers ( World world ) { } public final int getModifiers ( ) { } public final TypeX [ ] getExceptions ( World world ) { } public TypeX [ ] getExceptions ( ) { } public ShadowMunger getAssociatedShadowMunger ( ) { } public boolean isAjSynthetic ( ) { } <START_BUG> public boolean hasAnnotation ( ResolvedTypeX ofType ) { <END_BUG> return false ; } public ResolvedTypeX [ ] getAnnotationTypes ( ) { } public boolean isBridgeMethod ( ) { } public boolean isVarargsMethod ( ) { } public boolean isSynthetic ( ) { } public void write ( DataOutputStream s ) throws IOException { } public static void writeArray ( ResolvedMember [ ] members , DataOutputStream s ) throws IOException { } public static ResolvedMember readResolvedMember ( DataInputStream s , ISourceContext sourceContext ) throws IOException { } public static ResolvedMember [ ] readResolvedMemberArray ( DataInputStream s , ISourceContext context ) throws IOException { } public ResolvedMember resolve ( World world ) { } public ISourceContext getSourceContext ( World world ) { } public final String [ ] getParameterNames ( ) { } public final String [ ] getParameterNames ( World world ) { } public EffectiveSignatureAttribute getEffectiveSignature ( ) { } public ISourceLocation getSourceLocation ( ) { } public int getEnd ( ) { } public ISourceContext getSourceContext ( ) { } public int getStart ( ) { } public void setPosition ( int sourceStart , int sourceEnd ) { } public void setSourceContext ( ISourceContext sourceContext ) { } public boolean isAbstract ( ) { } public boolean isPublic ( ) { } public boolean isVisible ( ResolvedTypeX fromType ) { } public void setCheckedExceptions ( TypeX [ ] checkedExceptions ) { } }

Fix:
public boolean hasAnnotation ( TypeX ofType ) {
Buggy code:
public class ExampleSampler extends AbstractSampler { protected static Logger log = LoggingManager . getLoggerForClass ( ) ; public static final String DATA = "ExampleSampler.data" ; private static transient int classCount = 0 ; public ExampleSampler ( ) { } public SampleResult sample ( Entry e ) { trace ( "sample()" ) ; SampleResult res = new SampleResult ( ) ; boolean isOK = false ; String data = getData ( ) ; String response = null ; res . setSampleLabel ( getTitle ( ) ) ; res . sampleStart ( ) ; try { response = Thread . currentThread ( ) . getName ( ) ; res . setSamplerData ( data ) ; res . setResponseData ( response . getBytes ( ) ) ; res . setDataType ( TEXT ) ; <START_BUG> res . setResponseCodeOK ( ) ; <END_BUG> res . setResponseMessage ( "OK" ) ; isOK = true ; } catch ( Exception ex ) { ExampleSampler . log . debug ( "" , ex ) ; res . setResponseCode ( "500" ) ; res . setResponseMessage ( ex . toString ( ) ) ; } res . sampleEnd ( ) ; res . setSuccessful ( isOK ) ; return res ; } private String getTitle ( ) { } public String getData ( ) { } private void trace ( String s ) { } }

Fix:
res . setResponseCode ( "200" ) ;
Buggy code:
public class Scheme { private static Scanner getScanner ( ) { Scanner scanner = new Scanner ( System . in ) ; <START_BUG> Pattern delim = Pattern . compile ( "(<seq2seq4repair_space>\r?\n)|(\r?\n){2}" ) ; <END_BUG> scanner . useDelimiter ( delim ) ; return scanner ; } public static void main ( String [ ] args ) throws Exception { } }

Fix:
Pattern delim = Pattern . compile ( "<seq2seq4repair_space>\r?\n" ) ;
Buggy code:
public final class BeanPlantChat { private BeanPlantChat ( ) { } public static int NEW_NETWORK_CHAT_PORT ; private static final int PORT = 9998 ; private static ServerSocket socket ; public static String [ ] Arguments ; public static ExitManager exitmanager ; private static ArgumentParser argumentParser ; private static void checkIfRunning ( ) { try { BeanPlantChat . socket = new ServerSocket ( BeanPlantChat . PORT , 0 , InetAddress . getByAddress ( new byte [ ] { 127 , 0 , 0 , 1 } ) ) ; } catch ( BindException e ) { <START_BUG> Logger . getLogger ( BeanPlantChat . class . getName ( ) ) . log ( Level . SEVERE , null , e ) ; <END_BUG> UITools . showErrorMessage ( ( ( "Only<seq2seq4repair_space>one<seq2seq4repair_space>instance<seq2seq4repair_space>of<seq2seq4repair_space>" + ( Constants . APP_NAME ) ) + "<seq2seq4repair_space>can<seq2seq4repair_space>be<seq2seq4repair_space>running<seq2seq4repair_space>at<seq2seq4repair_space>a<seq2seq4repair_space>time!" ) , "Error" ) ; ExitManager . exit ( 1 , "BeanPlant<seq2seq4repair_space>Chat<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>running" , false ) ; } catch ( IOException e ) { Logger . getLogger ( BeanPlantChat . class . getName ( ) ) . log ( Level . FINE , null , e ) ; } } public static void obtainInfo ( final String [ ] arguments , final String s ) { } public static void main ( final String [ ] arguments ) { } public static void launch ( final String [ ] arguments ) { } private static void setSettingsFromArguments ( final ArgumentParser argumentParser ) { } private static void loadUserInterface ( final ArgumentParser argumentParser ) { } No newline ; at end ; of file ; }

Fix:
Logger . getLogger ( BeanPlantChat . class . getName ( ) ) . log ( Level . FINE , null , e ) ;
Buggy code:
@ Mojo ( name = "sct-rf2-to-arf" , defaultPhase = LifecyclePhase . PROCESS_SOURCES ) public class SctRf2ToArfMojo extends BaseRF2Mojo { @ Override public void execute ( ) throws MojoExecutionException , MojoFailureException { } private void writeSctSnomedLongId ( BufferedWriter writer , long sctId , String date , String path , String author , String module ) throws IOException { writer . append ( ( ( Rf2x . convertSctIdToUuidStr ( sctId ) ) + ( TAB_CHARACTER ) ) ) ; <START_BUG> writer . append ( ( ( SIGNED_INTEGER . getPrimodialUuid ( ) . toString ( ) ) + ( TAB_CHARACTER ) ) ) ; <END_BUG> writer . append ( ( ( Long . toString ( sctId ) ) + ( TAB_CHARACTER ) ) ) ; writer . append ( ( ( Rf2x . convertActiveToStatusUuid ( true ) ) + ( TAB_CHARACTER ) ) ) ; writer . append ( ( date + ( TAB_CHARACTER ) ) ) ; writer . append ( ( path + ( TAB_CHARACTER ) ) ) ; writer . append ( ( author + ( TAB_CHARACTER ) ) ) ; writer . append ( ( module + ( LINE_TERMINATOR ) ) ) ; } }

Fix:
writer . append ( ( ( SNOMED_INTEGER_ID . getPrimodialUuid ( ) . toString ( ) ) + ( TAB_CHARACTER ) ) ) ;
Buggy code:
public abstract class AbstractEstimator implements Estimator { protected AbstractEstimator ( ) { } public final void setMaxCostEval ( int maxCostEval ) { } public final int getCostEvaluations ( ) { } public final int getJacobianEvaluations ( ) { } protected void updateJacobian ( ) { } protected final void incrementJacobianEvaluationsCounter ( ) { } protected void updateResidualsAndCost ( ) throws EstimationException { } public double getRMS ( EstimationProblem problem ) { } public double getChiSquare ( EstimationProblem problem ) { } public double [ ] [ ] getCovariances ( EstimationProblem problem ) throws EstimationException { updateJacobian ( ) ; final int rows = problem . getMeasurements ( ) . length ; final int cols = problem . getUnboundParameters ( ) . length ; final int max = cols * rows ; double [ ] [ ] jTj = new double [ cols ] [ cols ] ; for ( int i = 0 ; i < cols ; ++ i ) { for ( int j = i ; j < cols ; ++ j ) { double sum = 0 ; for ( int k = 0 ; k < max ; k += cols ) { sum += ( jacobian [ ( k + i ) ] ) * ( jacobian [ ( k + j ) ] ) ; } jTj [ i ] [ j ] = sum ; jTj [ j ] [ i ] = sum ; } } try { <START_BUG> return new RealMatrixImpl ( jTj ) . inverse ( ) . getData ( ) ; <END_BUG> } catch ( InvalidMatrixException ime ) { throw new EstimationException ( "unable<seq2seq4repair_space>to<seq2seq4repair_space>compute<seq2seq4repair_space>covariances:<seq2seq4repair_space>singular<seq2seq4repair_space>problem" , new Object [ 0 ] ) ; } } public double [ ] guessParametersErrors ( EstimationProblem problem ) throws EstimationException { } protected void initializeEstimate ( EstimationProblem problem ) { } public abstract void estimate ( EstimationProblem problem ) throws EstimationException { } protected WeightedMeasurement [ ] measurements ; protected EstimatedParameter [ ] parameters ; protected double [ ] jacobian ; protected int cols ; protected int rows ; protected double [ ] residuals ; protected double cost ; private int maxCostEval ; private int costEvaluations ; private int jacobianEvaluations ; }

Fix:
return ( ( org . apache . commons . math . linear . RealMatrixImpl ) ( new org . apache . commons . math . linear . RealMatrixImpl ( jTj , false ) . inverse ( ) ) ) . getDataRef ( ) ;
Buggy code:
public class SortableListViewHeaders extends HtmlContainer { private final Log log = LogFactory . getLog ( SortableListViewHeaders . class ) ; private final SortableListViewHeaderGroup group ; public SortableListViewHeaders ( final String componentName , final ListView listView ) { } protected void handleRender ( ) { final SortableListViewHeaders me = this ; MarkupStream markupStream = this . findMarkupStream ( ) ; final int markupStart = markupStream . getCurrentIndex ( ) ; ComponentTag tag = markupStream . getTag ( ) ; <START_BUG> checkTag ( tag , "thead" ) ; <END_BUG> markupStream . next ( ) ; while ( markupStream . hasMore ( ) ) { final MarkupElement element = markupStream . get ( ) ; if ( element instanceof ComponentTag ) { tag = ( ( ComponentTag ) ( element ) ) ; if ( tag . getName ( ) . equalsIgnoreCase ( "th" ) ) { final String componentName = tag . getComponentName ( ) ; if ( ( componentName != null ) && ( ( get ( componentName ) ) == null ) ) { add ( new SortableListViewHeader ( componentName , group ) { protected int compareTo ( final Object o1 , final Object o2 ) { return me . compareTo ( this , o1 , o2 ) ; } protected Comparable getObjectToCompare ( final Object object ) { return me . getObjectToCompare ( this , object ) ; } } ) ; } } } markupStream . next ( ) ; } markupStream . setCurrentIndex ( markupStart ) ; super . handleRender ( ) ; } protected int compareTo ( final SortableListViewHeader header , final Object o1 , final Object o2 ) { } protected Comparable getObjectToCompare ( final SortableListViewHeader header , final Object object ) { } }

Fix:
checkComponentTag ( tag , "thead" ) ;
Buggy code:
public class HintHandler extends FetchPlanHintHandler { private static final Localizer _loc = Localizer . forPackage ( HintHandler . class ) ; private final QueryImpl owner ; private Map < String , Object > _hints ; private static Set < String > _supportedKeys ; private static Set < String > _supportedPrefixes ; public static final String HINT_SUBCLASSES = "openjpa.Subclasses" ; public static final String HINT_FILTER_LISTENER = "openjpa.FilterListener" ; public static final String HINT_FILTER_LISTENERS = "openjpa.FilterListeners" ; public static final String HINT_AGGREGATE_LISTENER = "openjpa.AggregateListener" ; public static final String HINT_AGGREGATE_LISTENERS = "openjpa.AggregateListeners" ; HintHandler ( QueryImpl impl ) { } @ SuppressWarnings ( "unchecked" ) public Map < String , Object > getHints ( ) { } private Boolean record ( String hint , Object value ) { } public Set < String > getSupportedHints ( ) { if ( ( HintHandler . _supportedKeys ) == null ) { HintHandler . _supportedKeys = new TreeSet < String > ( ) ; HintHandler . _supportedPrefixes = new TreeSet < String > ( ) ; HintHandler . _supportedKeys . addAll ( Reflection . getFieldValues ( QueryHints . class , ( ( ( Modifier . PUBLIC ) | ( Modifier . STATIC ) ) | ( Modifier . FINAL ) ) , String . class ) ) ; HintHandler . _supportedKeys . addAll ( addPrefix ( PREFIX_FETCHPLAN , Reflection . getBeanStylePropertyNames ( owner . getFetchPlan ( ) . getClass ( ) ) ) ) ; <START_BUG> HintHandler . _supportedKeys . addAll ( JavaxHintsMap . keySet ( ) ) ; <END_BUG> HintHandler . _supportedKeys . addAll ( Reflection . getFieldValues ( HintHandler . class , ( ( ( Modifier . PUBLIC ) | ( Modifier . STATIC ) ) | ( Modifier . FINAL ) ) , String . class ) ) ; HintHandler . _supportedKeys . addAll ( ProductDerivations . getSupportedQueryHints ( ) ) ; for ( String key : HintHandler . _supportedKeys ) { HintHandler . _supportedPrefixes . add ( getPrefixOf ( key ) ) ; } } return HintHandler . _supportedKeys ; } public void addHintKey ( String key ) { } public Set < String > getKnownPrefixes ( ) { } private boolean isSupported ( String key ) { } private boolean isKnownHintPrefix ( String key ) { } public void setHint ( String key , Object value ) { } protected boolean setHintInternal ( String key , Object value , boolean validateThrowException ) { } protected String hintToKey ( String key ) { } private Set < String > addPrefix ( String prefix , Set < String > original ) { } }

Fix:
HintHandler . _supportedKeys . addAll ( javaxHintsMap . keySet ( ) ) ;
Buggy code:
public final class UserController implements FocusListener , KeyListener { private class KeyRemapper { private char remapTrigger_ = '~' ; private HashMap < Character , Character > map_ = new HashMap < Character , Character > ( ) ; private boolean rebindMode_ = false ; private char rebindA_ = nullChar_ ; public HashMap < Character , Character > getMap ( ) { } public void setMap ( HashMap < Character , Character > newMap ) { } public char remapInput ( char c ) { } } public UserController ( MapUser_Interface mui , String uName ) { } private MapUser_Interface MapUserAble_ ; private final String userName_ ; private Viewport currentView_ = new AvatarCreationView ( ) ; private final char nullChar_ = ( ( char ) ( 0 ) ) ; private final char stillChar_ = 'M' ; private UserController . KeyRemapper remap_ = new UserController . KeyRemapper ( ) ; private void setView ( char c ) { } private void takeTurn ( KeyEvent e ) { } public String getUserName ( ) { } public HashMap < Character , Character > getRemap ( ) { } public void setRemap ( HashMap < Character , Character > remap ) { if ( ( remap_ ) == null ) remap_ = new UserController . KeyRemapper ( ) ; <START_BUG> remap_ . setMap ( remap_ ) ; <END_BUG> } @ Override public void keyPressed ( KeyEvent e ) { } @ Override public void keyReleased ( KeyEvent e ) { } @ Override public void keyTyped ( KeyEvent e ) { } @ Override public void focusGained ( FocusEvent arg0 ) { } @ Override public void focusLost ( FocusEvent arg0 ) { } }

Fix:
remap_ . setMap ( remap ) ;
Buggy code:
public class TransactionAttributeAnnotationProcessor extends AbstractAnnotationEJBProcessor < EJBComponentDescription > { private static final DotName TRANSACTION_ATTRIBUTE_ANNOTATION_NAME = DotName . createSimple ( TransactionAttribute . class . getName ( ) ) ; @ Override protected Class < EJBComponentDescription > getComponentDescriptionType ( ) { } @ Override protected void processAnnotations ( ClassInfo beanClass , CompositeIndex index , EJBComponentDescription componentDescription ) throws DeploymentUnitProcessingException { } private void processClassAnnotations ( ClassInfo beanClass , MethodIntf methodIntf , CompositeIndex index , EJBComponentDescription componentDescription ) throws DeploymentUnitProcessingException { final DotName superName = beanClass . superName ( ) ; if ( superName != null ) { ClassInfo superClass = index . getClassByName ( superName ) ; if ( superClass != null ) processClassAnnotations ( superClass , methodIntf , index , componentDescription ) ; } final Map < DotName , List < AnnotationInstance > > classAnnotations = beanClass . annotations ( ) ; if ( classAnnotations == null ) return ; List < AnnotationInstance > annotations = classAnnotations . get ( TransactionAttributeAnnotationProcessor . TRANSACTION_ATTRIBUTE_ANNOTATION_NAME ) ; if ( annotations == null ) return ; for ( AnnotationInstance annotationInstance : annotations ) { AnnotationTarget target = annotationInstance . target ( ) ; TransactionAttributeType transactionAttributeType = TransactionAttributeType . valueOf ( annotationInstance . value ( ) . asEnum ( ) ) ; if ( target instanceof ClassInfo ) { final String className = target . toString ( ) ; <START_BUG> componentDescription . setTransactionAttribute ( methodIntf , className , transactionAttributeType ) ; <END_BUG> } else if ( target instanceof MethodInfo ) { final MethodInfo method = ( ( MethodInfo ) ( target ) ) ; final String className = method . declaringClass ( ) . toString ( ) ; componentDescription . setTransactionAttribute ( methodIntf , transactionAttributeType , className , method . name ( ) , TransactionAttributeAnnotationProcessor . toString ( method . args ( ) ) ) ; } } } private void processViewAnnotations ( CompositeIndex index , EJBComponentDescription ejbComponentDescription ) throws DeploymentUnitProcessingException { } private static String [ ] toString ( Object [ ] a ) { } }

Fix:
componentDescription . setTransactionAttribute ( methodIntf , ( methodIntf == null ? className : null ) , transactionAttributeType ) ;
Buggy code:
public final class Styles { public static final LabelStyle LABEL_DEBUG = new Label . LabelStyle ( ) ; public static final LabelStyle LABEL_CREDITS = new Label . LabelStyle ( ) ; public static final LabelStyle LABEL_VERSION = new Label . LabelStyle ( ) ; public static final TextButtonStyle BUTTON_MENU = new TextButton . TextButtonStyle ( ) ; public static void init ( ) { Styles . LABEL_DEBUG . font = AssetManager . getFont ( DEBUG_20 ) ; Styles . LABEL_DEBUG . fontColor = WHITE . cpy ( ) ; Styles . LABEL_CREDITS . font = AssetManager . getFont ( OPENSANS_SMALL_16 ) ; Color color = PRIMARY . cpy ( ) ; color . a = 0.5F ; Styles . LABEL_CREDITS . fontColor = color ; Styles . LABEL_VERSION . font = AssetManager . getFont ( OPENSANS_SMALL_16 ) ; color = PRIMARY_ADDITION . cpy ( ) ; color . a = 0.8F ; Styles . LABEL_VERSION . fontColor = color ; Styles . BUTTON_MENU . font = AssetManager . getFont ( OPENSANS_MEDIUM_32 ) ; Styles . BUTTON_MENU . fontColor = PRIMARY . cpy ( ) ; Styles . BUTTON_MENU . overFontColor = Color . ORANGE ; Styles . BUTTON_MENU . up = new com . badlogic . gdx . scenes . scene2d . utils . NinePatchDrawable ( GraphicsFactory . createNinePatch ( BUTTON , 40 ) ) ; <START_BUG> Styles . BUTTON_MENU . down = new com . badlogic . gdx . scenes . scene2d . utils . NinePatchDrawable ( GraphicsFactory . createNinePatch ( BUTTON , 40 ) ) ; <END_BUG> Styles . BUTTON_MENU . over = new com . badlogic . gdx . scenes . scene2d . utils . NinePatchDrawable ( GraphicsFactory . createNinePatch ( BUTTON_ACTIVE , 40 ) ) ; } }

Fix:
Styles . BUTTON_MENU . down = new com . badlogic . gdx . scenes . scene2d . utils . NinePatchDrawable ( GraphicsFactory . createNinePatch ( BUTTON_ACTIVE , 40 ) ) ;
Buggy code:
public class RegNonTerminal extends RegexObject { private String defName = null ; private static final String defSuffix = "_D" ; private boolean isa = false ; private boolean refer = false ; private String label ; public RegNonTerminal ( String label ) { } public void setDefName ( ) { } public String getDefName ( ) { } public void setIsa ( ) { } public boolean getIsa ( ) { } public void setRefer ( boolean b ) { } public boolean getRefer ( ) { } public String getLabel ( ) { } @ Override public String getLetter ( ) { } @ Override public String toString ( ) { if ( writePegMode ) { if ( isa ) { if ( ( this . quantifier ) == null ) <START_BUG> return ( ( ( "<isa<seq2seq4repair_space>" + ( defName ) ) + "<seq2seq4repair_space>" ) + ( label ) ) + ">" ; <END_BUG> else return ( ( "<isa<seq2seq4repair_space>" + ( defName ) ) + ">" ) + ( this . quantifier . toString ( ) ) ; } else if ( refer ) { if ( ( this . quantifier ) == null ) return ( ( ( "<def<seq2seq4repair_space>" + ( defName ) ) + "<seq2seq4repair_space>" ) + ( label ) ) + ">" ; else return ( ( ( ( "<def<seq2seq4repair_space>" + ( defName ) ) + "<seq2seq4repair_space>" ) + ( label ) ) + ">" ) + ( this . quantifier . toString ( ) ) ; } else { if ( ( this . quantifier ) == null ) return label ; else return ( label ) + ( this . quantifier . toString ( ) ) ; } } else { if ( ( this . quantifier ) == null ) return label ; else return ( label ) + ( this . quantifier . toString ( ) ) ; } } }

Fix:
return ( "<isa<seq2seq4repair_space>" + ( defName ) ) + ">" ;
Buggy code:
@ Singleton public class BackupManager { private String defaultBackupDir ; @ Inject public BackupManager ( @ Named ( "installation-manager.backup_dir" ) String defaultBackupDir ) throws IOException { } public BackupConfig backup ( BackupConfig initialConfig ) throws IOException , IllegalStateException { } public void restore ( BackupConfig initialConfig ) throws IOException , IllegalArgumentException { } protected void checkBackup ( Artifact restoringArtifact , BackupConfig storedBackupConfig ) throws IllegalArgumentException , IllegalStateException { String backedUpArtifactName = storedBackupConfig . getArtifactName ( ) ; String restoringArtifactName = restoringArtifact . getName ( ) ; if ( ! ( restoringArtifactName . equals ( backedUpArtifactName ) ) ) { throw new IllegalArgumentException ( String . format ( "Backed<seq2seq4repair_space>up<seq2seq4repair_space>artifact<seq2seq4repair_space>'%s'<seq2seq4repair_space>doesn't<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>restoring<seq2seq4repair_space>artifact<seq2seq4repair_space>'%s'" , backedUpArtifactName , restoringArtifactName ) ) ; } String backedUpArtifactVersion = storedBackupConfig . getArtifactVersion ( ) ; Version restoringArtifactVersion ; String nullVersionErrorMessage = String . format ( "It<seq2seq4repair_space>is<seq2seq4repair_space>impossible<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>version<seq2seq4repair_space>of<seq2seq4repair_space>restoring<seq2seq4repair_space>artifact<seq2seq4repair_space>'%s'" , restoringArtifactName ) ; try { restoringArtifactVersion = restoringArtifact . getInstalledVersion ( ) ; } catch ( IOException e ) { throw new IllegalStateException ( nullVersionErrorMessage ) ; } if ( restoringArtifactVersion == null ) { throw new IllegalStateException ( nullVersionErrorMessage ) ; } if ( ! ( restoringArtifactVersion . toString ( ) . equals ( backedUpArtifactVersion ) ) ) { <START_BUG> throw new IllegalArgumentException ( String . format ( "Version<seq2seq4repair_space>of<seq2seq4repair_space>backed<seq2seq4repair_space>up<seq2seq4repair_space>artifact<seq2seq4repair_space>'%s'<seq2seq4repair_space>doesn't<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>restoring<seq2seq4repair_space>restoring<seq2seq4repair_space>version<seq2seq4repair_space>'%s'" , backedUpArtifactVersion , restoringArtifactVersion ) ) ; <END_BUG> } } protected Artifact getArtifact ( String artifactName ) throws ArtifactNotFoundException { } }

Fix:
throw new IllegalArgumentException ( String . format ( "Version<seq2seq4repair_space>of<seq2seq4repair_space>backed<seq2seq4repair_space>up<seq2seq4repair_space>artifact<seq2seq4repair_space>'%s'<seq2seq4repair_space>doesn't<seq2seq4repair_space>equal<seq2seq4repair_space>to<seq2seq4repair_space>restoring<seq2seq4repair_space>version<seq2seq4repair_space>'%s'" , backedUpArtifactVersion , restoringArtifactVersion ) ) ;