nus-yam/ex-repair huggingface dataset:
Buggy code:
public class EntryFragment extends Fragment implements UpdateReportEntriesTask . OnRetrieveResponseListener { private EntryAdapter mAdapter ; private Activity mActivity ; private static EntryFragment fragment ; public static final String ID_TAG = "id" ; public static final String VIEW_TAG = "isView" ; public static final String IMAGE_TAG = "image" ; public static final String COMMENT_TAG = "comment" ; public static EntryFragment getFragmentInstance ( ) { } public static EntryFragment newInstance ( ) { } public EntryFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View view = inflater . inflate ( fragment_entry , container , false ) ; final ListView entries = ( ( ListView ) ( view . findViewById ( list ) ) ) ; mAdapter = new EntryAdapter ( getActivity ( ) , layout . row_entry ) ; if ( ( ( mActivity ) != null ) && ( ( mActivity ) instanceof RetrieveReportActivity ) ) { final Report report = ( ( RetrieveReportActivity ) ( mActivity ) ) . getReport ( ) ; populateEntries ( report ) ; ImageView update = ( ( ImageView ) ( view . findViewById ( update_entries ) ) ) ; update . setVisibility ( VISIBLE ) ; update . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { <START_BUG> new UpdateReportEntriesTask ( getEntries ( ) , mActivity , report . getId ( ) ) . execute ( ) ; <END_BUG> } } ) ; } entries . setAdapter ( mAdapter ) ; entries . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { public void onItemClick ( AdapterView < ? > parent , View v , int position , long id ) { showInCommentActivity ( position ) ; } } ) ; entries . setOnItemLongClickListener ( new AdapterView . OnItemLongClickListener ( ) { @ Override public boolean onItemLongClick ( AdapterView < ? > parent , View view , int position , long id ) { final long entryId = id ; if ( mAdapter . getItem ( ( ( int ) ( id ) ) ) . getAuthor ( ) . equals ( ( ( com . jgermaine . fyp . android_client . application . CouncilAlertApplication ) ( getActivity ( ) . getApplication ( ) ) ) . getUser ( ) . getEmail ( ) ) ) { displayDeletionDialog ( position ) ; } return true ; } } ) ; view . findViewById ( tapToAdd ) . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent intent = new Intent ( getActivity ( ) , CommentActivity . class ) ; startActivity ( intent ) ; } } ) ; return view ; } private void populateEntries ( Report report ) { } private void showInCommentActivity ( final int position ) { } private void displayDeletionDialog ( final int position ) { } public void onResponseReceived ( Integer response ) { } public void addEntry ( Entry entry , long id ) { } public List < Entry > getEntries ( ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onDetach ( ) { } @ Override public void onDestroy ( ) { } }

Fix:
new UpdateReportEntriesTask ( getEntries ( ) , mActivity , EntryFragment . fragment , report . getId ( ) ) . execute ( ) ;
Buggy code:
public class RandomSimilarityProvider extends PerFieldSimilarityWrapper { final DefaultSimilarity defaultSim = new DefaultSimilarity ( ) ; final List < Similarity > knownSims ; Map < String , Similarity > previousMappings = new HashMap < String , Similarity > ( ) ; final int perFieldSeed ; final int coordType ; final boolean shouldQueryNorm ; public RandomSimilarityProvider ( Random random ) { } @ Override public float coord ( int overlap , int maxOverlap ) { } @ Override public float queryNorm ( float sumOfSquaredWeights ) { } @ Override public synchronized Similarity get ( String field ) { assert field != null ; Similarity sim = previousMappings . get ( field ) ; if ( sim == null ) { <START_BUG> sim = knownSims . get ( ( ( Math . abs ( ( ( perFieldSeed ) ^ ( field . hashCode ( ) ) ) ) ) % ( knownSims . size ( ) ) ) ) ; <END_BUG> previousMappings . put ( field , sim ) ; } return sim ; } static BasicModel [ ] BASIC_MODELS = new BasicModel [ ] { new BasicModelG ( ) , new BasicModelIF ( ) , new BasicModelIn ( ) , new BasicModelIne ( ) } ; static AfterEffect [ ] AFTER_EFFECTS = new AfterEffect [ ] { new AfterEffectB ( ) , new AfterEffectL ( ) , new AfterEffect . NoAfterEffect ( ) } ; static Normalization [ ] NORMALIZATIONS = new Normalization [ ] { new NormalizationH1 ( ) , new NormalizationH2 ( ) , new NormalizationH3 ( ) , new NormalizationZ ( ) } ; static Distribution [ ] DISTRIBUTIONS = new Distribution [ ] { new DistributionLL ( ) , new DistributionSPL ( ) } ; static Lambda [ ] LAMBDAS = new Lambda [ ] { new LambdaDF ( ) , new LambdaTTF ( ) } ; static List < Similarity > allSims ; @ Override public synchronized String toString ( ) { } }

Fix:
sim = knownSims . get ( ( ( Math . max ( 0 , Math . abs ( ( ( perFieldSeed ) ^ ( field . hashCode ( ) ) ) ) ) ) % ( knownSims . size ( ) ) ) ) ;
Buggy code:
public abstract class CommentRemover { public static void main ( final String [ ] args ) { } protected final CRConfig config ; protected CommentRemover ( final CRConfig config ) { } public abstract String deleteLineComment ( final String text ) { } public abstract String deleteBlockComment ( final String text ) { } public abstract String perform ( final String text ) { } public final String deleteBlankLine ( final String text ) { final StringBuilder result = new StringBuilder ( ) ; final StringBuilder line = new StringBuilder ( ) ; boolean blankline = true ; for ( int index = 0 ; index < ( text . length ( ) ) ; index ++ ) { final char c1 = text . charAt ( index ) ; final char c2 = ( ( index + 1 ) < ( text . length ( ) ) ) ? text . charAt ( ( index + 1 ) ) : '0' ; <START_BUG> if ( ( '<seq2seq4repair_space>' == c1 ) || ( '\t' == c1 ) ) { <END_BUG> line . append ( c1 ) ; } else if ( ( '\n' == c1 ) || ( ( '\r' == c1 ) && ( '\n' != c2 ) ) ) { if ( ! blankline ) { line . append ( c1 ) ; result . append ( line . toString ( ) ) ; } if ( 0 < ( line . length ( ) ) ) { line . delete ( 0 , line . length ( ) ) ; } blankline = true ; } else { line . append ( c1 ) ; blankline = false ; } } return result . toString ( ) ; } }

Fix:
if ( ( ( '<seq2seq4repair_space>' == c1 ) || ( '\t' == c1 ) ) || ( '\r' == c1 ) ) {
Buggy code:
public class Model < T extends Serializable > implements IModel < T > { private static final long serialVersionUID = 1L ; private T object ; public Model ( ) { } public Model ( final T object ) { } public static < C > IModel < List < ? extends C > > ofList ( final List < ? extends C > list ) { } public static < K , V > IModel < Map < K , V > > ofMap ( final Map < K , V > map ) { } public static < C > IModel < Set < ? extends C > > ofSet ( final Set < ? extends C > set ) { } public static < C > IModel < Collection < ? extends C > > of ( final Collection < ? extends C > set ) { } public static < T extends Serializable > Model < T > of ( T object ) { } public static < T extends Serializable > Model < T > of ( ) { } public T getObject ( ) { } public void setObject ( final T object ) { } public void detach ( ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( "Model:classname=[" ) ; <END_BUG> sb . append ( getClass ( ) . getName ( ) ) . append ( "]" ) ; sb . append ( ":object=[" ) . append ( object ) . append ( "]" ) ; return sb . toString ( ) ; } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ SuppressWarnings ( "unchecked" ) public static < T > IModel < T > of ( IModel < ? > model ) { } }

Fix:
StringBuilder sb = new StringBuilder ( "Model:classname=[" ) ;
Buggy code:
class FileWatcher implements Runnable { private static Logger LOG = Logger . getLogger ( FileWatcher . class ) ; private WatchService myWatcher ; private ProcessedIndex index ; private IPreferences preferences ; public FileWatcher ( WatchService myWatcher ) { } @ Override public void run ( ) { } private void processFile ( ) throws FileNotFoundException , IOException , ParseException , org . json . simple . parser . ParseException { } private boolean updateIndex ( Client client , ProcessedPage processedPage ) { JSONObject obj = new JSONObject ( ) ; obj . put ( "url" , processedPage . getUrl ( ) ) ; obj . put ( "title" , processedPage . getTitle ( ) ) ; obj . put ( "content" , processedPage . getContent ( ) ) ; <START_BUG> obj . put ( "modified" , processedPage . getModified ( ) ) ; <END_BUG> String json = null ; try { json = obj . toJSONString ( ) ; } catch ( Exception ex ) { FileWatcher . LOG . error ( ex , ex ) ; } if ( json == null ) { return false ; } FileWatcher . LOG . info ( json ) ; try { IndexResponse response = client . prepareIndex ( "helpindex" , "page" ) . setSource ( json ) . execute ( ) . actionGet ( ) ; } catch ( Exception ex ) { FileWatcher . LOG . error ( ex , ex ) ; } return true ; } public void setProcessedIndex ( ProcessedIndex index ) { } public void setPreferences ( IPreferences preferences ) { } }

Fix:
obj . put ( "modified" , ( ( "\"" + ( processedPage . getModified ( ) ) ) + "\"" ) ) ;
Buggy code:
public class Base64Codec13Test extends TestCase { public Base64Codec13Test ( String name ) { } private static final String [ ] STRINGS = new String [ 181 ] ; private static final String [ ] CHUNKED_STRINGS = new String [ Base64Codec13Test . STRINGS . length ] ; private static final byte [ ] [ ] BYTES = new byte [ Base64Codec13Test . STRINGS . length ] [ ] ; private static void initSTRINGS ( ) { } private static void initCHUNKED_STRINGS ( ) { } private static void initBYTES ( ) { } public void testEncoder ( ) throws EncoderException { } public void testDecoder ( ) throws DecoderException { } public void testBinaryEncoder ( ) throws EncoderException { } public void testBinaryDecoder ( ) throws DecoderException { } public void testStaticEncode ( ) throws EncoderException { } public void testStaticDecode ( ) throws DecoderException { } public void testStaticEncodeChunked ( ) throws EncoderException { } public void testStaticDecodeChunked ( ) throws DecoderException { } private static byte [ ] utf8 ( String s ) { try { return s != null ? s . getBytes ( "UTF-8" ) : null ; } catch ( UnsupportedEncodingException uee ) { <START_BUG> throw new IllegalStateException ( uee ) ; <END_BUG> } } public static void main ( String [ ] args ) { } }

Fix:
throw new IllegalStateException ( uee . toString ( ) ) ;
Buggy code:
public class JavaFxView extends Application { private static ViewController viewController ; private static Controller controller ; private static Label [ ] inputLabels ; private static Label [ ] targetLabels ; private static Label [ ] hiddenLabels ; private static ArrayList < Label > ihLabels = new ArrayList < > ( ) ; private static ArrayList < Label > hoLabels = new ArrayList < > ( ) ; private static Label [ ] outputLabels ; public static void setController ( Controller controller ) { } public void setViewController ( ViewController viewController ) { } @ Override public void start ( Stage primaryStage ) throws Exception { } private void initialize ( ) { JavaFxView . controller . stopBackpropagation ( ) ; JavaFxView . viewController . initializeNetwork ( ) ; double [ ] inputValues = JavaFxView . viewController . getInputValues ( ) ; <START_BUG> for ( int i = 0 ; i < ( inputValues . length ) ; i ++ ) <END_BUG> JavaFxView . inputLabels [ i ] . setText ( String . format ( "%.0f" , inputValues [ i ] ) ) ; double [ ] targetValues = JavaFxView . viewController . getTargetValues ( ) ; for ( int i = 0 ; i < ( targetValues . length ) ; i ++ ) JavaFxView . targetLabels [ i ] . setText ( String . format ( "%.4f" , targetValues [ i ] ) ) ; double [ ] hiddenValues = JavaFxView . viewController . getHiddenValues ( ) ; for ( int i = 0 ; i < ( hiddenValues . length ) ; i ++ ) JavaFxView . hiddenLabels [ i ] . setText ( String . format ( "%.4f" , hiddenValues [ i ] ) ) ; } private static void startBackProp ( ) { } public static void changeValues ( ) { } private HBox createTargets ( ) { } private HBox createInputCells ( ) { } private HBox createHiddenCells ( ) { } private HBox createOutputCells ( ) { } private HBox createInputToHidden ( ) { } private HBox createHiddenToOutput ( ) { } private HBox createTextField ( ) { } }

Fix:
for ( int i = 0 ; i < ( JavaFxView . inputLabels . length ) ; i ++ )
Buggy code:
public class TernNatureAdaptersManager implements IRegistryChangeListener { private static final String EXTENSION_TERN_NATURE_ADAPTERS = "ternNatureAdapters" ; private static final TernNatureAdaptersManager INSTANCE = new TernNatureAdaptersManager ( ) ; private Map < ITernNatureCapability , List < TernNatureAdaptersManager . DefaultModule > > ternNatureAdapters ; private boolean registryListenerIntialized ; private static class DefaultModule { private final String name ; private final boolean withDependencies ; private final JsonObject options ; public DefaultModule ( String name , boolean withDependencies , JsonObject options ) { } public String getName ( ) { } public boolean isWithDependencies ( ) { } public JsonObject getOptions ( ) { } } public static TernNatureAdaptersManager getManager ( ) { } public TernNatureAdaptersManager ( ) { } @ Override public void registryChanged ( final IRegistryChangeEvent event ) { } private synchronized void loadTernNatureAdapters ( ) { } private synchronized void addTernNatureAdapters ( IConfigurationElement [ ] cf , Map < ITernNatureCapability , List < TernNatureAdaptersManager . DefaultModule > > map ) { } private List < TernNatureAdaptersManager . DefaultModule > getDefaultModules ( IConfigurationElement ce ) { } private JsonObject getOptions ( String options ) { } protected void handleTernNatureAdapterDelta ( IExtensionDelta delta ) { } private void addRegistryListenerIfNeeded ( ) { } public void initialize ( ) { } public void destroy ( ) { } public boolean hasTernNature ( IProject project ) { } private Map < ITernNatureCapability , List < TernNatureAdaptersManager . DefaultModule > > getTernNatureAdapters ( ) { } public void addDefaultModules ( IDETernProject project ) throws CoreException { Map < ITernNatureCapability , List < TernNatureAdaptersManager . DefaultModule > > ternNatureAdapters = getTernNatureAdapters ( ) ; for ( ITernNatureCapability natureAdapter : ternNatureAdapters . keySet ( ) ) { if ( natureAdapter . hasTernNature ( project . getProject ( ) ) ) { List < TernNatureAdaptersManager . DefaultModule > defaultModules = ternNatureAdapters . get ( natureAdapter ) ; for ( TernNatureAdaptersManager . DefaultModule defaultModule : defaultModules ) { ITernModule module = TernCorePlugin . getTernServerTypeManager ( ) . findTernModule ( defaultModule . getName ( ) ) ; if ( module != null ) { JsonObject options = defaultModule . getOptions ( ) ; TernModuleHelper . update ( module , options , project ) ; if ( defaultModule . isWithDependencies ( ) ) { TernModuleMetadata metadata = module . getMetadata ( ) ; if ( metadata != null ) { <START_BUG> Collection < String > dependencies = metadata . getDependencies ( ) ; <END_BUG> for ( String dependency : dependencies ) { ITernModule dependencyModule = TernCorePlugin . getTernServerTypeManager ( ) . findTernModule ( dependency ) ; if ( dependencyModule != null ) { TernModuleHelper . update ( dependencyModule , null , project ) ; } } } } } } } } } }

Fix:
Collection < String > dependencies = metadata . getDependencies ( module . getVersion ( ) ) ;
Buggy code:
public class RefillValidator implements ShapelessValidator { @ Override public ItemStack getResult ( List < ItemStack > ingredients ) { ItemStack enderPearl ; ItemStack enderFly ; if ( ( ingredients . get ( 0 ) . getType ( ) ) == ( Material . ENDER_PEARL ) ) { enderPearl = ingredients . get ( 0 ) ; enderFly = ingredients . get ( 1 ) . clone ( ) ; } else { enderPearl = ingredients . get ( 1 ) ; enderFly = ingredients . get ( 0 ) . clone ( ) ; } List < String > lore = enderFly . getItemMeta ( ) . getLore ( ) ; String info = Util . unhideString ( lore . get ( 2 ) ) ; String [ ] numbers = info . replace ( ( ( "[" + ( EnderFly . ENDERFLY_PREFIX ) ) + "]" ) , "" ) . split ( "-" ) ; int timeLeft = Integer . valueOf ( numbers [ 1 ] ) ; int actualPearls = getNumPearls ( enderFly , enderPearl ) ; if ( actualPearls == 0 ) { return null ; } timeLeft = Math . min ( ( ( actualPearls * ( EnderFly . SEC_PER_PEARL ) ) + timeLeft ) , ( ( enderFly . getType ( ) . getMaxDurability ( ) ) // ( EnderFly . ONE_SEC ) ) ) ; <START_BUG> String time = String . format ( ENDERFLY_TIME , ( timeLeft + "s" ) , ( ( ( enderFly . getType ( ) . getMaxDurability ( ) ) // ( EnderFly . ONE_SEC ) ) + "s" ) ) ; <END_BUG> info = Util . hideString ( String . format ( ENDERFLY_STRING , numbers [ 0 ] , timeLeft , numbers [ 2 ] ) ) ; ItemMeta meta = enderFly . getItemMeta ( ) ; lore . remove ( 2 ) ; lore . remove ( 1 ) ; lore . add ( time ) ; lore . add ( info ) ; meta . setLore ( lore ) ; enderFly . setItemMeta ( meta ) ; return enderFly ; } private int getNumPearls ( ItemStack enderFly , ItemStack enderPearl ) { } @ Override public boolean validate ( List < ItemStack > ingredients ) { } @ Override public Map < ItemStack , Integer > costMatrix ( List < ItemStack > ingredients ) { } }

Fix:
String time = String . format ( ENDERFLY_TIME , timeLeft , ( ( enderFly . getType ( ) . getMaxDurability ( ) ) // ( EnderFly . ONE_SEC ) ) ) ;
Buggy code:
public class IntroAction extends Action implements ActionFactory . IWorkbenchAction { private IWorkbenchWindow workbenchWindow ; public IntroAction ( IWorkbenchWindow window ) { } public void dispose ( ) { } public void run ( ) { <START_BUG> workbenchWindow . getWorkbench ( ) . showIntro ( workbenchWindow , false ) ; <END_BUG> } }

Fix:
workbenchWindow . getWorkbench ( ) . getIntroManager ( ) . showIntro ( workbenchWindow , false ) ;
Buggy code:
public class ContextObserverWithMemory extends ContentObserver { private static final String TAG = ContextObserverWithMemory . class . getSimpleName ( ) ; private static final int CURSOR_START_POSITION = - 1 ; public static ContextObserverWithMemory createInstanceLocatedAtStart ( Handler handler , Uri contentUri , ContentResolver contentResolver ) { } public static ContextObserverWithMemory createInstanceLocatedAtEnd ( Handler handler , Uri contentUri , ContentResolver contentResolver ) { Cursor cursor = contentResolver . query ( contentUri , null , null , null , null ) ; <START_BUG> int initialPosition = cursor . getCount ( ) ; <END_BUG> cursor . close ( ) ; return new ContextObserverWithMemory ( handler , contentUri , contentResolver , initialPosition ) ; } private final Uri contentUri ; private final ContentResolver contentResolver ; private final ContextRecordCreator contextRecordCreator = new ContextRecordCreator ( ) ; private int lastReadRecordPosition ; private ContextObserverWithMemory ( Handler handler , Uri contentUri , ContentResolver contentResolver , int initialPosition ) { } private ContextObserverWithMemory ( Handler handler , Uri contentUri , ContentResolver contentResolver ) { } @ Override public void onChange ( boolean selfChange ) { } }

Fix:
int initialPosition = ( cursor . getCount ( ) ) - 1 ;
Buggy code:
public class OSGiFrameworkPropertyRemove extends AbstractRemoveStepHandler { static final OSGiFrameworkPropertyRemove INSTANCE = new OSGiFrameworkPropertyRemove ( ) ; private OSGiFrameworkPropertyRemove ( ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { final String propName = operation . get ( OP_ADDR ) . asObject ( ) . get ( PROPERTY ) . asString ( ) ; final SubsystemState subsystemState = SubsystemState . getSubsystemState ( context ) ; if ( subsystemState == null ) { context . setRollbackOnly ( ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; return ; } <START_BUG> final Object oldVal = subsystemState . setProperty ( propName , null ) ; <END_BUG> context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { subsystemState . setProperty ( propName , oldVal ) ; } } ) ; } }

Fix:
final String oldVal = subsystemState . setProperty ( propName , null ) ;
Buggy code:
public class SampleConditionType implements EntitlementCondition { public static final String LENGTH_FIELD = "nameLength" ; private int nameLength = 0 ; public int getNameLength ( ) { } public void setNameLength ( int nameLength ) { } private String displayType ; @ Override public void setDisplayType ( String displayType ) { } @ Override public String getDisplayType ( ) { } @ Override public void init ( Map < String , Set < String > > map ) { } private static String getInitStringValue ( Set < String > set ) { } @ Override public void setState ( String state ) { } @ Override public String getState ( ) { } @ Override public void validate ( ) throws EntitlementException { } @ Override public ConditionDecision evaluate ( String realm , Subject subject , String resource , Map < String , Set < String > > environment ) throws EntitlementException { boolean authorized = true ; for ( Principal principal : subject . getPrincipals ( ) ) { String userDn = principal . getName ( ) ; int start = userDn . indexOf ( '=' ) ; int end = userDn . indexOf ( ',' ) ; if ( end <= start ) { <START_BUG> throw new EntitlementException ( EntitlementException . CONDITION_EVALUTATION_FAILED , ( "Name<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>DN:<seq2seq4repair_space>" + userDn ) ) ; <END_BUG> } String userName = userDn . substring ( ( start + 1 ) , end ) ; if ( ( userName . length ( ) ) < ( getNameLength ( ) ) ) { authorized = false ; } } return new ConditionDecision ( authorized , Collections . EMPTY_MAP ) ; } }

Fix:
throw new EntitlementException ( EntitlementException . CONDITION_EVALUATION_FAILED , ( "Name<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>DN:<seq2seq4repair_space>" + userDn ) ) ;
Buggy code:
public class UMLTreeCellRenderer extends BasicTreeCellRenderer { protected ImageIcon _AttributeIcon = UMLTreeCellRenderer . loadIconResource ( "Attribute" ) ; protected ImageIcon _OperationIcon = UMLTreeCellRenderer . loadIconResource ( "Operation" ) ; protected ImageIcon _ClassIcon = UMLTreeCellRenderer . loadIconResource ( "Class" ) ; protected ImageIcon _PackageIcon = UMLTreeCellRenderer . loadIconResource ( "Package" ) ; protected ImageIcon _AssociationIcon = UMLTreeCellRenderer . loadIconResource ( "Association" ) ; public Component getTreeCellRendererComponent ( JTree tree , Object value , boolean sel , boolean expanded , boolean leaf , int row , boolean hasFocus ) { } protected static ImageIcon loadIconResource ( String name ) { } protected static String imageName ( String name ) { <START_BUG> return ( "Images//Tree" + ( UMLTreeCellRenderer . stripJunk ( name ) ) ) + ".gif" ; <END_BUG> } protected static String stripJunk ( String s ) { } }

Fix:
return ( "//Images//Tree" + ( UMLTreeCellRenderer . stripJunk ( name ) ) ) + ".gif" ;
Buggy code:
public class BoundedInputStream extends InputStream { private final InputStream in ; private final long max ; private long pos = 0 ; private long mark = - 1 ; private boolean propagateClose = true ; public BoundedInputStream ( InputStream in , long size ) { } public BoundedInputStream ( InputStream in ) { } @ Override public int read ( ) throws IOException { <START_BUG> if ( ( ( max ) >= 0 ) && ( ( pos ) == ( max ) ) ) { <END_BUG> return - 1 ; } int result = in . read ( ) ; ( pos ) ++ ; return result ; } @ Override public int read ( byte [ ] b ) throws IOException { } @ Override public int read ( byte [ ] b , int off , int len ) throws IOException { } @ Override public long skip ( long n ) throws IOException { } @ Override public int available ( ) throws IOException { } @ Override public String toString ( ) { } @ Override public void close ( ) throws IOException { } @ Override public synchronized void reset ( ) throws IOException { } @ Override public synchronized void mark ( int readlimit ) { } @ Override public boolean markSupported ( ) { } public boolean isPropagateClose ( ) { } public void setPropagateClose ( boolean propagateClose ) { } }

Fix:
if ( ( ( max ) >= 0 ) && ( ( pos ) >= ( max ) ) ) {
Buggy code:
public class WicketTagPanelTest extends TestCase { private static Log log = LogFactory . getLog ( WicketTagPanelTest . class ) ; private MockWebApplication application ; public WicketTagPanelTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; application = new MockWebApplication ( null ) ; <START_BUG> application . getRequiredPageSettings ( ) . setHomePage ( WicketPanelPage . class ) ; <END_BUG> } public void testRenderHomePage ( ) throws Exception { } private boolean validatePage1 ( String document ) { } public void testRenderHomePageWicketTagRemoved ( ) throws Exception { } private boolean validatePage2 ( String document ) { } }

Fix:
application . setHomePage ( WicketPanelPage . class ) ;
Buggy code:
public class XdfWriter implements SdfWriter { @ Override public String write ( String path , SoftwareDefinitionFileBuilder builder ) throws Exception { } public String write ( File file , SdfFile sdfFile ) throws Exception { JAXBContext jaxbContext = JAXBContext . newInstance ( SdfFile . class ) ; Marshaller jaxbMarshaller = jaxbContext . createMarshaller ( ) ; NamespacePrefixMapper mapper = new NamespacePrefixMapper ( ) { public String getPreferredPrefix ( String namespaceUri , String suggestion , boolean requirePrefix ) { if ( namespaceUri . contains ( "arinc.com" ) ) { return "sdf" ; } else { return "" ; } } } ; jaxbMarshaller . setProperty ( "com.sun.xml.bind.namespacePrefixMapper" , mapper ) ; jaxbMarshaller . setProperty ( Marshaller . JAXB_FORMATTED_OUTPUT , true ) ; jaxbMarshaller . marshal ( sdfFile , file ) ; <START_BUG> return file . getCanonicalPath ( ) ; <END_BUG> } }

Fix:
return file . getAbsolutePath ( ) ;
Buggy code:
public class EditorList extends AbstractTableInformationControl { private class EditorListContentProvider implements IStructuredContentProvider { private EditorPresentation editorPresentation ; public EditorListContentProvider ( ) { } public void dispose ( ) { } public Object [ ] getElements ( Object inputElement ) { } public void inputChanged ( Viewer viewer , Object oldInput , Object newInput ) { } } private class EditorListLabelProvider extends LabelProvider implements IFontProvider { private Font boldFont = null ; public EditorListLabelProvider ( ) { } public String getText ( Object element ) { } public Image getImage ( Object element ) { } public Font getFont ( Object element ) { } public void dispose ( ) { } } private class EditorListViewerSorter extends ViewerSorter { public EditorListViewerSorter ( ) { } public EditorListViewerSorter ( Collator collator ) { } public int compare ( Viewer viewer , Object e1 , Object e2 ) { } public int category ( Object element ) { } } public EditorList ( Shell parent , int shellStyle , int treeStyle ) { } protected TableViewer createTableViewer ( Composite parent , int style ) { Table table = new Table ( parent , ( ( SWT . SINGLE ) | ( style & ( ~ ( SWT . MULTI ) ) ) ) ) ; <START_BUG> table . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; <END_BUG> TableViewer tableViewer = new TableViewer ( table ) ; tableViewer . addFilter ( new NamePatternFilter ( ) ) ; tableViewer . setContentProvider ( new EditorList . EditorListContentProvider ( ) ) ; tableViewer . setSorter ( new EditorList . EditorListViewerSorter ( ) ) ; tableViewer . setLabelProvider ( new EditorList . EditorListLabelProvider ( ) ) ; return tableViewer ; } public void setInput ( Object information ) { } protected void gotoSelectedElement ( ) { } protected void deleteSelectedElements ( ) { } }

Fix:
table . setLayoutData ( new GridData ( GridData . VERTICAL_ALIGN_BEGINNING ) ) ;
Buggy code:
public final class LocalizedImageResource implements Serializable , IResourceListener { private static final long serialVersionUID = 1L ; private Boolean resourceKind ; private Component component ; private Resource resource ; private ResourceReference resourceReference ; private transient Locale locale ; private transient String style ; private static final class ImageValueParser extends MetaPatternParser { private static final Group factoryName = new Group ( MetaPattern . VARIABLE_NAME ) ; private static final Group imageReferenceName = new Group ( MetaPattern . VARIABLE_NAME ) ; private static final Group specification = new Group ( MetaPattern . ANYTHING_NON_EMPTY ) ; private static final MetaPattern pattern = new MetaPattern ( new MetaPattern [ ] { LocalizedImageResource . ImageValueParser . factoryName , MetaPattern . COLON , new wicket . util . parse . metapattern . OptionalMetaPattern ( new MetaPattern [ ] { LocalizedImageResource . ImageValueParser . imageReferenceName } ) , MetaPattern . COLON , LocalizedImageResource . ImageValueParser . specification } ) ; private ImageValueParser ( final CharSequence input ) { } private String getFactoryName ( ) { } private String getImageReferenceName ( ) { } private String getSpecification ( ) { } } public LocalizedImageResource ( final Component component ) { } public final void bind ( ) { } public final void onResourceRequested ( ) { } public final void setResource ( final Resource resource ) { } public final void setResourceReference ( final ResourceReference resourceReference ) { } public final void setSrcAttribute ( final ComponentTag tag ) { } private IResourceFactory getResourceFactory ( final Application application , final String factoryName ) { <START_BUG> final IResourceFactory factory = application . getResourceFactory ( factoryName ) ; <END_BUG> if ( factory == null ) { throw new WicketRuntimeException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>image<seq2seq4repair_space>resource<seq2seq4repair_space>factory<seq2seq4repair_space>named<seq2seq4repair_space>" + factoryName ) ) ; } return factory ; } private void loadStaticImage ( final String path ) { } private void newImage ( final String value ) { } }

Fix:
final IResourceFactory factory = application . getResourceSettings ( ) . getResourceFactory ( factoryName ) ;
Buggy code:
class ManagedServerBootCmdFactory implements ManagedServerBootConfiguration { private static final String RMI_CLIENT_INTERVAL = "sun.rmi.dgc.client.gcInterval" ; private static final String RMI_SERVER_INTERVAL = "sun.rmi.dgc.server.gcInterval" ; private static final String DEFAULT_RMI_INTERVAL = "3600000" ; private static final ModelNode EMPTY = new ModelNode ( ) ; private final String serverName ; private final ModelNode domainModel ; private final ModelNode hostModel ; private final ModelNode serverModel ; private final ModelNode serverGroup ; private final JvmElement jvmElement ; private final HostControllerEnvironment environment ; private final boolean managementSubsystemEndpoint ; private final ModelNode endpointConfig = new ModelNode ( ) ; ManagedServerBootCmdFactory ( final String serverName , final ModelNode domainModel , final ModelNode hostModel , final HostControllerEnvironment environment ) { } public ManagedServerBootConfiguration createConfiguration ( ) { } @ Override public HostControllerEnvironment getHostControllerEnvironment ( ) { } @ Override public List < String > getServerLaunchCommand ( ) { } @ Override public boolean isManagementSubsystemEndpoint ( ) { } @ Override public ModelNode getSubsystemEndpointConfiguration ( ) { } private String getJavaCommand ( ) { } @ Override public Map < String , String > getServerLaunchEnvironment ( ) { } private Map < String , String > getAllSystemProperties ( boolean boottimeOnly ) { } private void addSystemProperties ( final ModelNode source , final Map < String , String > props , boolean boottimeOnly ) { if ( source . hasDefined ( SYSTEM_PROPERTY ) ) { for ( Property prop : source . get ( SYSTEM_PROPERTY ) . asPropertyList ( ) ) { ModelNode propResource = prop . getValue ( ) ; <START_BUG> if ( boottimeOnly && ( ! ( propResource . get ( BOOT_TIME ) . asBoolean ( ) ) ) ) { <END_BUG> continue ; } String val = ( propResource . hasDefined ( VALUE ) ) ? propResource . get ( VALUE ) . asString ( ) : null ; props . put ( prop . getName ( ) , val ) ; } } } private String addPathProperty ( final List < String > command , final String typeName , final String propertyName , final Map < String , String > properties , final DirectoryGrouping directoryGrouping , final File typeDir , File serverDir ) { } static String getAbsolutePath ( final File root , final String ... paths ) { } }

Fix:
if ( boottimeOnly && ( ! ( propResource . get ( BOOT_TIME ) . asBoolean ( false ) ) ) ) {
Buggy code:
public class MonthDayDV extends AbstractDateTimeDV { private static final int MONTHDAY_SIZE = 7 ; public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { } protected DateTimeData parse ( String str ) throws SchemaDateTimeException { <START_BUG> DateTimeData date = new DateTimeData ( this ) ; <END_BUG> int len = str . length ( ) ; date . year = YEAR ; if ( ( ( str . charAt ( 0 ) ) != '-' ) || ( ( str . charAt ( 1 ) ) != '-' ) ) { throw new SchemaDateTimeException ( ( "Invalid<seq2seq4repair_space>format<seq2seq4repair_space>for<seq2seq4repair_space>gMonthDay:<seq2seq4repair_space>" + str ) ) ; } date . month = parseInt ( str , 2 , 4 ) ; int start = 4 ; if ( ( str . charAt ( ( start ++ ) ) ) != '-' ) { throw new SchemaDateTimeException ( ( "Invalid<seq2seq4repair_space>format<seq2seq4repair_space>for<seq2seq4repair_space>gMonthDay:<seq2seq4repair_space>" + str ) ) ; } date . day = parseInt ( str , start , ( start + 2 ) ) ; if ( ( MonthDayDV . MONTHDAY_SIZE ) < len ) { int sign = findUTCSign ( str , MonthDayDV . MONTHDAY_SIZE , len ) ; if ( sign < 0 ) { throw new SchemaDateTimeException ( ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>month<seq2seq4repair_space>parsing:" + str ) ) ; } else { getTimeZone ( str , date , sign , len ) ; } } validateDateTime ( date ) ; if ( ( ( date . utc ) != 0 ) && ( ( date . utc ) != 'Z' ) ) { normalize ( date ) ; } date . position = 1 ; return date ; } protected String dateToString ( DateTimeData date ) { } }

Fix:
DateTimeData date = new DateTimeData ( str , this ) ;
Buggy code:
public class AssertEqualsUDF extends UDF { private static final Logger LOG = Logger . getLogger ( AssertEqualsUDF . class ) ; public String evaluate ( Double val1 , Double val2 ) { if ( ( val1 == null ) || ( val2 == null ) ) { AssertEqualsUDF . LOG . error ( ( ( ( "<seq2seq4repair_space>Null<seq2seq4repair_space>values<seq2seq4repair_space>found<seq2seq4repair_space>::<seq2seq4repair_space>" + val1 ) + "<seq2seq4repair_space>==<seq2seq4repair_space>" ) + val2 ) ) ; System . err . println ( ( ( ( "<seq2seq4repair_space>Null<seq2seq4repair_space>values<seq2seq4repair_space>found<seq2seq4repair_space>::<seq2seq4repair_space>" + val1 ) + "<seq2seq4repair_space>==<seq2seq4repair_space>" ) + val2 ) ) ; throw new RuntimeException ( ( ( ( "<seq2seq4repair_space>Null<seq2seq4repair_space>values<seq2seq4repair_space>found<seq2seq4repair_space>::<seq2seq4repair_space>" + val1 ) + "<seq2seq4repair_space>==<seq2seq4repair_space>" ) + val2 ) ) ; } <START_BUG> if ( ! ( val1 == val2 ) ) { <END_BUG> AssertEqualsUDF . LOG . error ( ( ( ( ( "<seq2seq4repair_space>Assertion<seq2seq4repair_space>Not<seq2seq4repair_space>Met<seq2seq4repair_space>::<seq2seq4repair_space>!<seq2seq4repair_space>(<seq2seq4repair_space>" + val1 ) + "<seq2seq4repair_space>==<seq2seq4repair_space>" ) + val2 ) + "<seq2seq4repair_space>)<seq2seq4repair_space>" ) ) ; System . err . println ( ( ( ( ( "<seq2seq4repair_space>Assertion<seq2seq4repair_space>Not<seq2seq4repair_space>Met<seq2seq4repair_space>::<seq2seq4repair_space>!<seq2seq4repair_space>(<seq2seq4repair_space>" + val1 ) + "<seq2seq4repair_space>==<seq2seq4repair_space>" ) + val2 ) + "<seq2seq4repair_space>)<seq2seq4repair_space>" ) ) ; throw new RuntimeException ( ( ( ( ( "<seq2seq4repair_space>Assertion<seq2seq4repair_space>Not<seq2seq4repair_space>Met<seq2seq4repair_space>::<seq2seq4repair_space>!<seq2seq4repair_space>(<seq2seq4repair_space>" + val1 ) + "<seq2seq4repair_space>==<seq2seq4repair_space>" ) + val2 ) + "<seq2seq4repair_space>)<seq2seq4repair_space>" ) ) ; } else { return ( ( val1 . toString ( ) ) + "<seq2seq4repair_space>==<seq2seq4repair_space>" ) + ( val2 . toString ( ) ) ; } } }

Fix:
if ( ! ( val1 . equals ( val2 ) ) ) {
Buggy code:
public final class LocalizedImageResource implements Serializable , IResourceListener { private Boolean resourceKind ; private Component component ; private Resource resource ; private ResourceReference resourceReference ; private transient Locale locale ; private transient String style ; private static final class ImageValueParser extends MetaPatternParser { private static final Group factoryName = new Group ( MetaPattern . VARIABLE_NAME ) ; private static final Group imageReferenceName = new Group ( MetaPattern . VARIABLE_NAME ) ; private static final Group specification = new Group ( MetaPattern . ANYTHING_NON_EMPTY ) ; private static final MetaPattern pattern = new MetaPattern ( new MetaPattern [ ] { LocalizedImageResource . ImageValueParser . factoryName , MetaPattern . COLON , new wicket . util . parse . metapattern . OptionalMetaPattern ( new MetaPattern [ ] { LocalizedImageResource . ImageValueParser . imageReferenceName } ) , MetaPattern . COLON , LocalizedImageResource . ImageValueParser . specification } ) ; private ImageValueParser ( final CharSequence input ) { } private String getFactoryName ( ) { } private String getImageReferenceName ( ) { } private String getSpecification ( ) { } } public LocalizedImageResource ( final Component component ) { } public final void bind ( ) { } public final void onResourceRequested ( ) { } public final void setResource ( final Resource resource ) { } public final void setResourceReference ( final ResourceReference resourceReference ) { } public final void setSrcAttribute ( final ComponentTag tag ) { } private IResourceFactory getResourceFactory ( final Application application , final String factoryName ) { } private void loadStaticImage ( final String path ) { final Class scope = component . findParentWithAssociatedMarkup ( ) . getClass ( ) ; this . resourceReference = new ResourceReference ( scope , path ) { protected Resource newResource ( ) { <START_BUG> return PackageResource . get ( getScope ( ) . getPackage ( ) , getName ( ) , locale , style ) ; <END_BUG> } } ; resourceReference . setLocale ( locale ) ; resourceReference . setStyle ( style ) ; bind ( ) ; } private void newImage ( final String value ) { } }

Fix:
return PackageResource . get ( getScope ( ) , getName ( ) , locale , style ) ;
Buggy code:
public class SchemaNominator { private RelationBuilder relationbuilder = null ; private Map < String , SubNodeDataSet > schema = null ; public SchemaNominator ( RelationBuilder relationbuilder ) { } private Set < String > calcIntersection ( Set < String > setX , Set < String > setY ) { } private Set < String > calcUnion ( Set < String > setX , Set < String > setY ) { } private double calcCoefficient ( SubNodeDataSet datasetX , SubNodeDataSet datasetY ) { } private void nominateSchema ( SubNodeDataSet nodeX , SubNodeDataSet nodeY ) { } public Map < String , SubNodeDataSet > getSchema ( ) { } private boolean isTargetSet ( SubNodeDataSet datasetX , SubNodeDataSet datasetY ) { } private boolean checkThreshhold ( double coefficient ) { <START_BUG> return ( coefficient > 0.5 ) && ( coefficient <= 1.0 ) ; <END_BUG> } private boolean calcSetRelation ( ArrayList < SubNodeDataSet > list , SubNodeDataSet datasetX , SubNodeDataSet datasetY ) { } private boolean checkRemoveSet ( ArrayList < SubNodeDataSet > list , int pos ) { } private boolean isNominatableSet ( ArrayList < SubNodeDataSet > list , int i , int j ) { } private void filter ( ArrayList < SubNodeDataSet > list ) { } public void nominate ( ) { } No newline ; at end ; of file ; }

Fix:
return ( 0.5 <= coefficient ) && ( coefficient <= 1.0 ) ;
Buggy code:
public class ClosedCard272 extends QuestionCardLeaf272 implements ICardState { String cats = "" ; public ICardComponent displayQCard ( MyWorld world , ICardState state , ICardComponent card , String typeOfTopic , String score , int x ) { world . setCurrentCard ( card ) ; ChallengeQuestion [ ] q = world . getQuestions ( ) ; world . addObject ( new QuestionScreen ( ) , 100 , 100 ) ; if ( x == 66 ) { cats = "Cloud" ; } else if ( x == 158 ) { cats = "Linux" ; } else if ( x == 256 ) { cats = "BigData" ; } else if ( x == 349 ) { <START_BUG> cats = "Security" ; <END_BUG> } else if ( x == 443 ) { cats = "Db" ; } else if ( x == 537 ) { cats = "Mixed" ; } for ( int i = 0 ; i < ( q . length ) ; i ++ ) { if ( ( cats . equalsIgnoreCase ( q [ i ] . cat ) ) && ( ( Integer . parseInt ( score ) ) == ( q [ i ] . value ) ) ) { world . addObject ( new Question ( q [ i ] . que , card ) , 305 , 60 ) ; world . addObject ( new TextField ( q [ i ] . answers . get ( 0 ) . ans , card , q [ i ] . answers . get ( 0 ) . isCorrect , Integer . parseInt ( score ) ) , 91 , 191 ) ; world . addObject ( new TextField ( q [ i ] . answers . get ( 1 ) . ans , card , q [ i ] . answers . get ( 1 ) . isCorrect , Integer . parseInt ( score ) ) , 91 , 247 ) ; world . addObject ( new TextField ( q [ i ] . answers . get ( 2 ) . ans , card , q [ i ] . answers . get ( 2 ) . isCorrect , Integer . parseInt ( score ) ) , 91 , 302 ) ; world . addObject ( new TextField ( q [ i ] . answers . get ( 3 ) . ans , card , q [ i ] . answers . get ( 3 ) . isCorrect , Integer . parseInt ( score ) ) , 91 , 356 ) ; world . answerClicked = false ; world . startTimer ( ) ; ( ( QuestionCardLeaf272 ) ( card ) ) . setCardState ( new OpenCard272 ( ) ) ; } } return card ; } @ Override public void timeOutCard ( MyWorld world , ICardComponent card ) { } @ Override public void resetCard ( ) { } }

Fix:
cats = "Unix" ;
Buggy code:
class SwitchProtocolRequestHandler implements IRequestHandler { public enum Protocol { HTTP , HTTPS , PRESERVE_CURRENT ; } private final SwitchProtocolRequestHandler . Protocol protocol ; private final IRequestHandler handler ; private final HttpsConfig httpsConfig ; SwitchProtocolRequestHandler ( SwitchProtocolRequestHandler . Protocol protocol , HttpsConfig httpsConfig ) { } SwitchProtocolRequestHandler ( SwitchProtocolRequestHandler . Protocol protocol , IRequestHandler handler , final HttpsConfig httpsConfig ) { } protected String getUrl ( String protocol , Integer port , HttpServletRequest request ) { } public void respond ( IRequestCycle requestCycle ) { WebRequest webRequest = ( ( WebRequest ) ( requestCycle . getRequest ( ) ) ) ; HttpServletRequest request = ( ( org . apache . wicket . protocol . http . servlet . ServletWebRequest ) ( webRequest ) ) . getHttpServletRequest ( ) ; Integer port = null ; if ( ( protocol ) == ( SwitchProtocolRequestHandler . Protocol . HTTP ) ) { if ( ( httpsConfig . getHttpPort ( ) ) != 80 ) { port = httpsConfig . getHttpPort ( ) ; } } else if ( ( protocol ) == ( SwitchProtocolRequestHandler . Protocol . HTTPS ) ) { if ( ( httpsConfig . getHttpsPort ( ) ) != 443 ) { port = httpsConfig . getHttpsPort ( ) ; } } final String url ; if ( ( handler ) == null ) { url = getUrl ( protocol . toString ( ) . toLowerCase ( ) , port , request ) ; } else { <START_BUG> url = ( ( RequestCycle ) ( requestCycle ) ) . urlFor ( handler ) . toString ( ) ; <END_BUG> } WebResponse response = ( ( WebResponse ) ( requestCycle . getResponse ( ) ) ) ; response . sendRedirect ( url ) ; } public static IRequestHandler requireProtocol ( SwitchProtocolRequestHandler . Protocol protocol , final HttpsConfig httpsConfig ) { } public static IRequestHandler requireProtocol ( SwitchProtocolRequestHandler . Protocol protocol , IRequestHandler handler , final HttpsConfig httpsConfig ) { } public void detach ( IRequestCycle requestCycle ) { } }

Fix:
url = ( ( RequestCycle ) ( requestCycle ) ) . mapUrlFor ( handler ) . toString ( ) ;
Buggy code:
public interface InvoiceService extends Repository < Invoice > { public Map < Invoice , List < Alarm > > getAlarms ( Invoice ... invoices ) { } public void raisingAlarms ( Invoice invoice , String alarmEngineCode ) { } @ Transactional ( rollbackOn = { AxelorException . class , Exception . class } ) public void compute ( final Invoice invoice ) throws AxelorException { } @ Transactional ( rollbackOn = { AxelorException . class , Exception . class } ) public void validate ( Invoice invoice ) throws AxelorException { } @ Transactional ( rollbackOn = { AxelorException . class , Exception . class } ) public void ventilate ( Invoice invoice ) throws AxelorException { } @ Transactional ( rollbackOn = { AxelorException . class , Exception . class } ) public void cancel ( Invoice invoice ) throws AxelorException { } @ Transactional public void usherProcess ( Invoice invoice ) { } @ Transactional ( rollbackOn = { AxelorException . class , Exception . class } ) <START_BUG> public void createRefund ( Invoice invoice ) throws AxelorException ; <END_BUG> }

Fix:
public Invoice createRefund ( Invoice invoice ) throws AxelorException ;
Buggy code:
public class PTree extends JPanel { private PMainPanel parent ; private JETree proTree ; public PTree ( PMainPanel parent ) { } private void initialize ( ) { } private synchronized void viewProject ( PTreeNode node , String path ) { } private synchronized boolean cloneProject ( String path , boolean force ) { String remoteRepo = ( ( ( ConfigAccessor . getInstance ( ) . getHostName ( ) ) + ":" ) + path ) + ".git" ; String localRepo = ConfigAccessor . getInstance ( ) . getLocalRepo ( ) ; localRepo = CommonUtil . toBackSlash ( localRepo ) ; localRepo = localRepo + ( CommonUtil . toBackSlash ( path ) ) ; if ( ! force ) { String message = "From:<seq2seq4repair_space>" + remoteRepo ; message += "\n<seq2seq4repair_space>To:<seq2seq4repair_space>" + localRepo ; int answer = JOptionPane . showConfirmDialog ( frame , message , "Clone<seq2seq4repair_space>repo<seq2seq4repair_space>to<seq2seq4repair_space>local" , JOptionPane . YES_NO_OPTION ) ; if ( answer != ( JOptionPane . OK_OPTION ) ) { return false ; } } File project = new File ( localRepo ) ; if ( project . exists ( ) ) { if ( ! force ) { int answer = JOptionPane . showConfirmDialog ( frame , "Exists<seq2seq4repair_space>in<seq2seq4repair_space>local,<seq2seq4repair_space>do<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>the<seq2seq4repair_space>existing<seq2seq4repair_space>repo?" , "" , JOptionPane . OK_CANCEL_OPTION ) ; <START_BUG> if ( answer == ( JOptionPane . OK_OPTION ) ) { <END_BUG> return false ; } } try { FileUtils . forceDelete ( project ) ; } catch ( IOException e ) { JOptionPane . showMessageDialog ( frame , ( "Delete<seq2seq4repair_space>directory<seq2seq4repair_space>failed,<seq2seq4repair_space>please<seq2seq4repair_space>delete<seq2seq4repair_space>manually.\n" + ( e . getMessage ( ) ) ) ) ; return false ; } } if ( ! ( project . getParentFile ( ) . exists ( ) ) ) { if ( ! ( project . getParentFile ( ) . mkdirs ( ) ) ) { setVisible ( false ) ; JOptionPane . showMessageDialog ( frame , ( "Creates<seq2seq4repair_space>the<seq2seq4repair_space>directory<seq2seq4repair_space>failed:" + ( project . getParentFile ( ) . getAbsoluteFile ( ) ) ) ) ; return false ; } } String msg = new GitCommand ( ) . clone ( project . getParentFile ( ) , remoteRepo ) ; if ( msg . contains ( "fatal:" ) ) { if ( ! force ) { JOptionPane . showMessageDialog ( frame , msg ) ; } return false ; } else { return true ; } } public PTreeNode getSelectedNode ( ) { } private void addPopup ( ) { } No newline ; at end ; of file ; }

Fix:
if ( answer != ( JOptionPane . OK_OPTION ) ) {